Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
import StringIO | |
from selenium import webdriver | |
from PIL import Image | |
# Install instructions | |
# | |
# npm install phantomjs | |
# sudo apt-get install libjpeg-dev | |
# pip install selenium pillow |
## | |
# "I did [mean that]" | |
# Re-run the suggested git command | |
# Intended to be run as 'idid "!!"' | |
# Place this file in your $PATH | |
# TODO create this as a brew script | |
## | |
declare last='' | |
declare selection_ordinal='1' |
import pygame, sys | |
from pygame.locals import * | |
import pickle | |
import select | |
import socket | |
WIDTH = 400 | |
HEIGHT = 400 | |
BUFFERSIZE = 2048 |
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.
""" | |
If you are not using this inside a cog, add the event decorator e.g: | |
@bot.event | |
async def on_command_error(ctx, error) | |
For examples of cogs see: | |
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be | |
For a list of exceptions: | |
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions |
This gist shows how to make the bot wait for a message or reaction after doing a command. This should not be copypasted.
Check the discord.py docs for a detailed explanation of how it all works internally and which kwargs it takes.
See here two commands, one waiting for any message in a channel and the other waiting for a reaction with a specific emoji.