This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
from discord.ext import commands | |
class QuickPoll: | |
"""""" | |
def __init__(self, bot): | |
self.bot = bot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
from discord.ext import commands | |
import aiohttp | |
from PIL import Image | |
import io | |
import asyncio | |
from itertools import zip_longest | |
async def build_avatar_cache(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
from discord.ext import commands | |
import aiohttp | |
from PIL import Image | |
import io | |
import asyncio | |
from itertools import zip_longest | |
from pathlib import Path | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
import json | |
import aiohttp | |
import asyncio | |
client = discord.Client() | |
user = 'CLEVERBOT.IO API USER' | |
key = 'CLEVERBOT.IO API KEY' | |
client.session = aiohttp.ClientSession() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
import aiohttp | |
import re | |
def nexus_json_to_embed(json_data, game_name): | |
title = json_data.get('name', '')[:256] | |
# replace html escapes with ascii values. ex- " turns into quotes | |
description = re.sub(r'&#(\d{2});', lambda x: chr(int(x.group(1))), json_data.get('summary', '')[:1024]) | |
url = json_data.get('mod_page_uri', '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from discord.ext import commands | |
from PIL import Image, ImageDraw, ImageFont | |
import aiohttp | |
import io | |
import re | |
@commands.command(pass_context=True) | |
async def angry(self, ctx, *, string='missing\n arguments'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import traceback | |
import sys | |
from discord.ext import commands | |
import discord | |
class CommandErrorHandler: | |
def __init__(self, bot): | |
self.bot = bot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
import asyncio | |
import re | |
from discord.ext import commands | |
import sys | |
import traceback | |
time_regex = re.compile("(?:(\d{1,5})(h|s|m|d))+?") | |
time_dict = {"h":3600, "s":1, "m":60, "d":86400} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"grinning": "\ud83d\ude00", | |
"smiley": "\ud83d\ude03", | |
"smile": "\ud83d\ude04", | |
"grin": "\ud83d\ude01", | |
"laughing": "\ud83d\ude06", | |
"satisfied": "\ud83d\ude06", | |
"face_holding_back_tears": "\ud83e\udd79", | |
"sweat_smile": "\ud83d\ude05", | |
"joy": "\ud83d\ude02", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
from discord.ext import commands | |
import sys, traceback | |
"""This is a multi file example showcasing many features of the command extension and the use of cogs. | |
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic | |
understanding and platform for creating your own bot. | |
These examples make use of Python 3.6.2 and the rewrite version on the lib. |
OlderNewer