Browse Source

fixed custom commands again. Now works.

tags/v1.4.0
roxie 6 years ago
parent
commit
eacb77b880
2 changed files with 7 additions and 8 deletions
  1. +2
    -2
      cogs/customcommands.py
  2. +5
    -6
      main.py

+ 2
- 2
cogs/customcommands.py View File

@@ -19,11 +19,11 @@ class CustomCommands():
self.servers = self.con.servers

async def on_message(self, message):
if blacklisted(message.author) or message.channel.type == discord.ChannelType.private:
if blacklisted(message.author) or type(message.channel) != discord.TextChannel:
return
msg = message.content.lower()
channel = message.channel
server = str(message.server.id)
server = str(message.guild.id)
if message.author == self.bot.user:
return
if msg.startswith(self.bot.command_prefix):

+ 5
- 6
main.py View File

@@ -37,13 +37,12 @@ async def on_ready():
server_config.error_check(bot.guilds)
print("Discord.py version: " + discord.__version__)
print("Client logged in\n")
#

#print("Cogs Loaded:")
#for cog in load_config.cogs:
# bot.load_extension(cog)
# print(cog)
#print("")
print("Cogs Loaded:")
for cog in load_config.cogs:
bot.load_extension(cog)
print(cog)
print("")

print("Servers I am currently in:")
for server in bot.guilds:

Loading…
Cancel
Save