Moved the startup ping response to a module, so it will only reply if the modules are enabled

This commit is contained in:
Logan Cusano
2022-03-16 23:52:17 -04:00
parent db0922bf68
commit c564a145b5
4 changed files with 38 additions and 17 deletions

View File

@@ -2,7 +2,7 @@ import re
import discord
from discord.ext import commands
import random
from BotResources import PDB_KNOWN_BOT_IDS
from BotResources import PDB_KNOWN_BOT_IDS, check_and_reply_to_ping
regex_link = re.compile('(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)')
@@ -71,7 +71,7 @@ class LinkCop(commands.Cog):
print(f"Link Cop Error: '{err}'")
print(f"Bot or other non-user that has not been whitelisted sent a message")
await self.bot.check_and_reply_to_ping(ctx)
await check_and_reply_to_ping(self.bot, ctx)
async def send_message(self, message):
send_channel = self.bot.get_channel(id=self.reply_channel_id)