Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevnull.py
More file actions
Latest commit
39 lines (30 loc) · 1.24 KB
/
Copy pathdevnull.py
File metadata and controls
39 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
fromdiscord.extimportcommands
importdiscord
importos
defget_prefix(bot, msg):
returnos.environ['PREFIX']
intents=discord.Intents.all()
bot=commands.Bot(command_prefix=get_prefix, intents=intents)
@bot.event
asyncdefon_ready():
print('Ready!')
@bot.event
asyncdefon_command_error(ctx, error):
ifisinstance(error, commands.CommandNotFound):
awaitctx.send(bot.get_emoji(694341216267010078))
elifisinstance(error, commands.MissingRequiredArgument):
awaitctx.send(f'Missing required argument {bot.get_emoji(667775700538753034)}')
elifisinstance(error, commands.BadArgument):
awaitctx.send(f'Absolute bullshit argument {bot.get_emoji(629773774920744990)}')
elifisinstance(error, commands.MissingPermissions):
awaitctx.send(f'If you think you can do that... {bot.get_emoji(668526049277247498)}')
elifisinstance(error, commands.NotOwner):
awaitctx.send(f'You are not that guy pal {bot.get_emoji(694344505431949323)}')
raiseerror
forfilenameinos.listdir('./cogs'):
iffilename.endswith('.py'):
try:
bot.load_extension(f'cogs.{filename[:-3]}')
except:
print(f'Failed to load extension: {filename}')
bot.run(os.environ['TOKEN'])