Update: WillieTimer

This commit is contained in:
Logan Cusano
2021-12-31 02:31:35 -05:00
parent 6d47a570f8
commit f89c3dc1cb

View File

@@ -14,8 +14,8 @@ class WillieTimer(commands.Cog):
self.bot = bot
self.mention_group = str(self.bot.Default_Mention_Group)
self.channel_id = int(self.bot.Default_Channel_ID)
self.channel = self.bot.get_channel(id=self.channel_id)
self.guild = self.channel.guild
self.channel = None
self.guild = None
self.lock = False
self.current_420_phrase = None
self.current_warm_up_phrase = None
@@ -52,6 +52,8 @@ class WillieTimer(commands.Cog):
member = member or ctx.author.display_name
if not self.lock:
await ctx.send(f"Thanks {member}, Willie will be in touch soon...")
self.channel = self.bot.get_channel(id=self.channel_id)
self.guild = self.channel.guild
self.lock = True
self.caller_name = str(member)
self.bg_timer.start()
@@ -105,6 +107,8 @@ class WillieTimer(commands.Cog):
@commands.command(help='Test random choice')
async def test_rchoice(self, ctx, *, member: discord.Member = None):
member = member or ctx.author.display_name
self.channel = self.bot.get_channel(id=self.channel_id)
self.guild = self.channel.guild
strings_dict = self.get_output_string()
await ctx.send(f"420:\t{strings_dict['420']}\nWarning:\t{strings_dict['warm up']}", tts=True)