You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2023. It is now read-only.
Fully removed TTS
Patched up a couple of inconsistencies
Changed a few notes
Changed all ' to " (with a few exceptions)
Used f"" more often
Minor code edits
(The NSFW module was so neglected)
This was really needed, and could use more cleanup (rewriting a few oddly / poorly written functions)
Copy file name to clipboardExpand all lines: main.py
+57-56Lines changed: 57 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@
14
14
importos
15
15
prefix="##"
16
16
DevID=260016427900076033
17
-
logChannels= {'errors':872153712347467776,'boot-ups':872208035093839932} # These are different from the guild-defined LogChannel channels, these are essentially telemetry
logChannels= {"errors":872153712347467776,"boot-ups":872208035093839932} # These are different from the guild-defined LogChannel channels, these are essentially telemetry
awaitmsg.channel.send(embed=fromdict({'title':'Slow Down','description':'That command is limited for '+simplifySeconds(math.floor(result))+' more seconds','color':colours['warning']}),delete_after=result)
361
+
awaitmsg.channel.send(embed=fromdict({"title":"Slow Down","description":f"That command is limited for {simplifySeconds(math.floor(result))} more seconds","color":colours["warning"]}),delete_after=result)
newchannel.position=channel.position#Because clone doesnt include position
433
-
awaitnewchannel.send(embed=fromdict({'title':'Success','description':channel.name+' has been re-made and cleared','color':colours['success']}),delete_after=60)
434
+
awaitnewchannel.send(embed=fromdict({"title":"Success","description":channel.name+" has been re-made and cleared","color":colours["success"]}),delete_after=60)
awaitclient.get_channel(logChannels['boot-ups']).send("Ive connected at "+currentDate())
496
+
awaitclient.get_channel(logChannels["boot-ups"]).send("Ive connected at "+currentDate())
496
497
except:
497
498
log("Failed to alert of bootup at "+currentDate())
498
499
@client.event
@@ -501,15 +502,15 @@ async def on_message(msg):
501
502
ifmsg.guild:
502
503
awaitgetMegaTable(msg).FilterMessage(msg)
503
504
elifmsg.author.id!=client.user.id:
504
-
awaitmsg.channel.send(embed=fromdict({'title':'Not here','description':'This bot can only be used in a server, and not dms','color':colours['error']}))
505
+
awaitmsg.channel.send(embed=fromdict({"title":"Not here","description":"This bot can only be used in a server, and not dms","color":colours["error"]}))
505
506
return
506
507
gmt=getMegaTable(msg)
507
508
awaitgmt.FilterMessage(msg)
508
509
iftype(msg.author) ==discord.User: #Webhook
509
510
return
510
-
ifawaitgmt.CheckConfirmation(msg):
511
-
return
512
-
args=msg.content.split(' ') #Please keep in mind the first argument is the calling command
511
+
ifawaitgmt.CheckConfirmation(msg):#Confirmations arent commands, simple as that
512
+
returnawaitcheckHistoryClear(msg)
513
+
args=msg.content.split(" ") #Please keep in mind the first argument is the calling command
513
514
ifmsg.author.id==DevID:
514
515
ifawaitdoTheCheck(msg,args,devCommands):
515
516
return
@@ -518,26 +519,26 @@ async def on_message(msg):
518
519
return
519
520
ifawaitdoTheCheck(msg,args,userCommands):
520
521
return
521
-
awaitcheckHistoryClear(msg) #Since its fired after a command, add a backup here
522
+
awaitcheckHistoryClear(msg) #Since its fired after a command, add a backup check here
522
523
@client.event
523
524
asyncdefon_raw_message_edit(msg): #On message edit to avoid bypassing
Command(["commands","cmds"],cmds,1,"List all commands",{"group":False},None,"General")
692
693
asyncdefpublicVote(msg,args):
693
694
iflen(args) <2:
694
-
awaitmsg.channel.send(embed=fromdict({'title':'Error','description':'You gotta include the thing to vote on','color':colours['error']}),delete_after=30)
695
+
awaitmsg.channel.send(embed=fromdict({"title":"Error","description":"You gotta include the thing to vote on","color":colours["error"]}),delete_after=10)
voteMsg=awaitmsg.channel.send(embed=fromdict({'author':{'name':author.name+"#"+author.discriminator+' is calling a vote','icon_url':str(author.avatar_url)},'description':msgContent,'image':{'url':imageUrl},'color':colours['info']}))
712
+
msgContent=msgContent+i+" "
713
+
voteMsg=awaitmsg.channel.send(embed=fromdict({"author":{"name":f"{author.name}#{author.discriminator} is calling a vote","icon_url":str(author.avatar_url)},"description":msgContent,"image":{"url":imageUrl},"color":colours["info"]}))
0 commit comments