51
51
"Fixed the userinfocommand " ,
52
52
"Fixed the serverinfo command" ,
53
53
"Fixed the invite command " ,
54
- "Fixed the joinserver command"
54
+ "Fixed the joinserver command" ,
55
+ "Fixed the uploadfile command" ,
56
+ "+ uppercase" ,
57
+ "+ lowercase" ,
55
58
"Other things:" ,
56
59
"Now using python 3.6" ,
60
+ "Fixed the \" no nsfw channel\" message that wouldn't display in dms" ,
61
+ "Support team members now ave a seperate id config entry."
57
62
]
58
63
59
64
async def _restart_bot ():
@@ -151,11 +156,14 @@ async def on_command_error(ctx, error):
151
156
if isinstance (error , commands .DisabledCommand ):
152
157
await ctx .send (Language .get ("bot.errors.disabled_command" , ctx ))
153
158
return
159
+ if isinstance (error , checks .owner_only ):
160
+ await ctx .send (Language .get ("bot.errors.owner_only" , ctx ))
161
+ return
154
162
if isinstance (error , checks .dev_only ):
155
163
await ctx .send (Language .get ("bot.errors.dev_only" , ctx ))
156
164
return
157
- if isinstance (error , checks .owner_only ):
158
- await ctx .send (Language .get ("bot.errors.owner_only " , ctx ))
165
+ if isinstance (error , checks .support_only ):
166
+ await ctx .send (Language .get ("bot.errors.support_only " , ctx ))
159
167
return
160
168
if isinstance (error , checks .not_nsfw_channel ):
161
169
await ctx .send (Language .get ("bot.errors.not_nsfw_channel" , ctx ))
@@ -321,6 +329,10 @@ async def notifydev(ctx, *, message:str):
321
329
dev = bot .get_user (id )
322
330
if dev :
323
331
await dev .send ("You have received a new message! The user's ID is `{}` Server: {}" .format (ctx .author .id , guild ), embed = msg )
332
+ for id in config .support_ids :
333
+ support_member = bot .get_user (id )
334
+ if support_member :
335
+ await support_member .send ("You have received a new message! The user's ID is `{}` Server: {}" .format (ctx .author .id , guild ), embed = msg )
324
336
await ctx .author .send (Language .get ("bot.dev_notify" , ctx ).format (message ))
325
337
326
338
@bot .command ()
@@ -338,6 +350,10 @@ async def suggest(ctx, *, suggestion:str):
338
350
dev = bot .get_user (id )
339
351
if dev :
340
352
await dev .send ("You have received a new suggestion! The user's ID is `{}` Server: {}" .format (ctx .author .id , guild ), embed = msg )
353
+ for id in config .support_ids :
354
+ support_member = bot .get_user (id )
355
+ if support_member :
356
+ await support_member .send ("You have received a new message! The user's ID is `{}` Server: {}" .format (ctx .author .id , guild ), embed = msg )
341
357
await ctx .author .send (Language .get ("bot.errors.dev_suggest" , ctx ).format (suggestion ))
342
358
343
359
@bot .command (hidden = True )
@@ -458,7 +474,7 @@ async def uploadfile(ctx, *, path:str):
458
474
"""Uploads any file on the system. What is this hackery?"""
459
475
await ctx .channel .trigger_typing ()
460
476
try :
461
- await bot . send_file ( ctx . channel , path )
477
+ await ctx . send ( file = discord . File ( path ) )
462
478
except FileNotFoundError :
463
479
await ctx .send ("That file does not exist!" )
464
480
@@ -473,7 +489,7 @@ async def version(ctx):
473
489
await ctx .send (Language .get ("bot.version" , ctx ).format (BUILD_VERSION , BUILD_AUTHORS , BUILD_CODENAME , BUILD_DATE ))
474
490
475
491
@bot .command (hidden = True )
476
- @checks .is_dev ()
492
+ @checks .is_support ()
477
493
async def dm (ctx , id :int , * , message :str ):
478
494
"""DMs a user"""
479
495
msg = make_message_embed (ctx .author , 0xFF0000 , message , formatUser = True )
@@ -566,6 +582,7 @@ async def stats(ctx):
566
582
await ctx .send (embed = embed )
567
583
568
584
@bot .command ()
585
+ @commands .guild_only ()
569
586
@checks .is_dev ()
570
587
async def editmessage (ctx , id :int , * , newmsg :str ):
571
588
"""Edits a message sent by the bot"""
0 commit comments