def __init__(self, bot): self.bot = bot self.spamer = date.load('spamer') self.black_user = date.load('black_user') self.not_mention = date.load('not_mention')
def __init__(self, bot): self.bot = bot self.bump_time = date.load('bump_time') self.check_bump_time.start()
from discord.ext import commands from cogs.utils import check from config import date import discord import traceback import os import subprocess import importlib black_list = date.load("black_list") class Admin(commands.Cog, command_attrs=dict(hidden=True)): def __init__(self, bot): self.bot = bot async def cog_check(self, ctx): return ctx.author.id == 650249780072677378 or ctx.author.id == 386289367955537930 @commands.command() async def load(self, ctx, module: str, opt=None): module = f'cogs.{module}' if opt is None: self.bot.load_extension(module) elif opt == 'un': self.bot.unload_extension(module) elif opt == 're': self.bot.reload_extension(module)
def __init__(self, bot): self.bot = bot self.member_is_bot = date.load('member_is_bot') self.member_not_is_bot = date.load('member_not_is_bot') self.global_ban = date.load('global_ban') self.black_user = date.load('black_user')
from config import date cmd_ena = date.load('cmd_ena') async def original_command_permissions(ctx): command = ctx.command guild_id = str(ctx.guild.id) if not cmd_ena.get(guild_id): return await ctx.message.add_reaction('\U00002757') elif cmd_ena[guild_id].get(command.name): server_key = cmd_ena[guild_id] run = True if server_key[command.name] == True else False if server_key[command.name] == False else '不正な値' await ctx.send(run) if run == True: return True elif run == False: return False
def __init__(self, bot): self.bot = bot self.create_voice = date.load('voice') self.create_text = date.load('text') self.new_text = date.load('new_channel')
def __init__(self, bot): self.bot = bot self.counter = date.load('member_counter') self.role_counter = date.load('role_counter') self.member_count.start() self.role_count.start()
def __init__(self, bot): self.bot = bot self.notice = date.load('notice')
from discord.ext import commands from config import date import botinfo import traceback import discord import asyncio prefixes = date.load('prefix') spamer = date.load('spamer') class ERP(commands.Bot): def __init__(self): super().__init__(command_prefix = 'e!', description = botinfo.description, help_attrs=dict(hidden=True)) self.token = botinfo.token self.load_extension(f"cogs.event.start") def default_embed(self, mes: str): e = discord.Embed( description = mes ) return e async def on_message(self, mes): if mes.author.bot: return await self.process_commands(mes)
def __init__(self, bot): self.bot = bot self.load = date.load("poll_channel")