def __init__(self, bot): global gcmds self.bot = bot self.tasks = [] gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_disboard()) self.bot.loop.create_task(self.check_unsent_reminder())
def __init__(self, bot: commands.AutoShardedBot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_logging()) self.guild_dispatch = logdispatcher.GuildDispatcher(self.bot) self.member_dispatch = logdispatcher.MemberDispatcher(self.bot)
def __init__(self, bot: commands.AutoShardedBot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_todo())
import asyncio import base64 from datetime import datetime import discord from discord.ext import commands from utils import EmbedPaginator, GlobalCMDS, SubcommandPaginator, customerrors gcmds = GlobalCMDS() class Todo(commands.Cog): def __init__(self, bot: commands.AutoShardedBot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_todo()) async def init_todo(self): await self.bot.wait_until_ready() async with self.bot.db.acquire() as con: await con.execute("CREATE TABLE IF NOT EXISTS todos(id SERIAL, message_content text, status text, timestamp NUMERIC, author_id bigint)") async def todo_help(self, ctx): pfx = f"{await gcmds.prefix(ctx)}todo" description = (f"{ctx.author.mention}, the base command is `{pfx}` *alias = `td` `todos`*. The `todo` commands " "serve as an alternative to `reminders`, which are scheduled to fire at a specific point in time," " or on a defined interval. If you just want an organised list of tasks to complete, or are not " "sure when you want to complete that task, then use `todo`\n\nHere are all the subcommands for `todo`") tset = (f"**Usage:** `{pfx} create [item]`", "**Returns:** An embed that confirms your todo was successfully created, or added to the current todo list",
def __init__(self, bot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_blacklist())
def __init__(self, bot: commands.AutoShardedBot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot)
def __init__(self, bot: commands.AutoShardedBot): super().__init__() self.bot = bot self.min_level = LogLevel.BASIC self.gcmds = GlobalCMDS(self.bot)
def __init__(self, bot: commands.AutoShardedBot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_blacklist()) self.bot.loop.create_task(self.init_balance())
def __init__(self, bot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot)
def __init__(self, bot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_welcomer())
import asyncio import mimetypes import random import re import aiohttp import discord from discord.ext import commands from num2words import num2words from utils import GlobalCMDS, SubcommandPaginator, customerrors gcmds = GlobalCMDS() timeout = 120 channel_tag_rx = re.compile(r'<#[\d]{18}>') channel_id_rx = re.compile(r'[\d]{18}') api_key = gcmds.env_check("TENOR_API") class Welcome(commands.Cog): def __init__(self, bot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_welcomer()) @commands.Cog.listener() async def on_member_join(self, member: discord.Member): await self.send_welcomer(member) @commands.Cog.listener() async def on_member_remove(self, member: discord.Member):
def __init__(self, bot): global gcmds self.bot = bot gcmds = GlobalCMDS(self.bot) self.tasks = [] self.bot.loop.create_task(self.init_reminders())
def __init__(self, bot: commands.AutoShardedBot): global gcmds, _bot self.bot = bot _bot = self.bot gcmds = GlobalCMDS(self.bot) self.bot.loop.create_task(self.init_serverlink())