mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Minor fixes
This commit is contained in:
parent
03332be3aa
commit
2e78a3f829
11
red.py
11
red.py
@ -611,6 +611,7 @@ async def delcom(message):
|
|||||||
|
|
||||||
async def listCustomCommands(message):
|
async def listCustomCommands(message):
|
||||||
msg = "Custom commands: \n\n```"
|
msg = "Custom commands: \n\n```"
|
||||||
|
if message.channel.server.id in commands:
|
||||||
cmds = commands[message.channel.server.id].keys()
|
cmds = commands[message.channel.server.id].keys()
|
||||||
if cmds:
|
if cmds:
|
||||||
for i, d in enumerate(cmds):
|
for i, d in enumerate(cmds):
|
||||||
@ -622,6 +623,8 @@ async def listCustomCommands(message):
|
|||||||
await client.send_message(message.author, msg)
|
await client.send_message(message.author, msg)
|
||||||
else:
|
else:
|
||||||
await client.send_message(message.author, "There are no custom commands.")
|
await client.send_message(message.author, "There are no custom commands.")
|
||||||
|
else:
|
||||||
|
await client.send_message(message.author, "There are no custom commands.")
|
||||||
|
|
||||||
def checkAuth(cmd, message, settings): #checks if those settings are on. If they are, it checks if the user is a owner
|
def checkAuth(cmd, message, settings): #checks if those settings are on. If they are, it checks if the user is a owner
|
||||||
if cmd == "ModifyCommands":
|
if cmd == "ModifyCommands":
|
||||||
@ -871,7 +874,7 @@ async def playVideo(message):
|
|||||||
return False
|
return False
|
||||||
stopMusic()
|
stopMusic()
|
||||||
if canDeleteMessages(message):
|
if canDeleteMessages(message):
|
||||||
await client.send_message(message.channel, "`Playing youtube video {} requested by {}`".format(id, message.author.name))
|
await client.send_message(message.channel, "`Playing` `https://www.youtube.com/watch?v={}` `requested by {}`".format(id, message.author.name))
|
||||||
await client.delete_message(message)
|
await client.delete_message(message)
|
||||||
if settings["DOWNLOADMODE"]:
|
if settings["DOWNLOADMODE"]:
|
||||||
toDelete = await client.send_message(message.channel, "`I'm in download mode. It might take a bit for me to start. I'll delete this message as soon as I'm ready.`".format(id, message.author.name))
|
toDelete = await client.send_message(message.channel, "`I'm in download mode. It might take a bit for me to start. I'll delete this message as soon as I'm ready.`".format(id, message.author.name))
|
||||||
@ -1262,7 +1265,8 @@ async def removeBadWords(message):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
await client.send_message(message.channel, "`Updated banned words database.`")
|
await client.send_message(message.channel, "`Updated banned words database.`")
|
||||||
dataIO.saveFilter(badwords)
|
dataIO.fileIO("filter.json", "save", badwords)
|
||||||
|
logger.info("Saved filter words.")
|
||||||
else:
|
else:
|
||||||
await client.send_message(message.channel, "`!removewords [word1] [word2] [phrase/with/many/words](...)`")
|
await client.send_message(message.channel, "`!removewords [word1] [word2] [phrase/with/many/words](...)`")
|
||||||
else:
|
else:
|
||||||
@ -1305,7 +1309,8 @@ async def removeRegex(message):
|
|||||||
if msg in badwords_regex[message.server.id]:
|
if msg in badwords_regex[message.server.id]:
|
||||||
badwords_regex[message.server.id].remove(msg)
|
badwords_regex[message.server.id].remove(msg)
|
||||||
await client.send_message(message.channel, "`Updated regex filter database.`")
|
await client.send_message(message.channel, "`Updated regex filter database.`")
|
||||||
dataIO.saveRegex(badwords_regex)
|
dataIO.fileIO("regex_filter.json", "save", badwords_regex)
|
||||||
|
logger.info("Saved regex filter database.")
|
||||||
else:
|
else:
|
||||||
await client.send_message(message.channel, "`No match.`")
|
await client.send_message(message.channel, "`No match.`")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user