mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix xkcd command
This commit is contained in:
parent
5691cccd10
commit
f58a17fedd
4 changed files with 13 additions and 4 deletions
|
@ -99,7 +99,7 @@ class Events(commands.Cog):
|
|||
if message.author.bot is True:
|
||||
return
|
||||
if self.bot.user in message.mentions:
|
||||
if message.content.lower() == "good bot":
|
||||
if message.content.startswith(self.bot.user.mention) and message.content.lower().endswith("good bot"):
|
||||
return await message.reply("Thank you! :D")
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import discord
|
|||
import aiohttp
|
||||
import random
|
||||
from discord.ext import commands
|
||||
from utils import console
|
||||
|
||||
|
||||
class OtherCog(commands.Cog):
|
||||
|
@ -65,6 +66,10 @@ class OtherCog(commands.Cog):
|
|||
super().__init__(timeout=300, disable_on_timeout=True)
|
||||
self.n = n
|
||||
|
||||
def __rich_repr__(self):
|
||||
yield "n", self.n
|
||||
yield "message", self.message
|
||||
|
||||
@discord.ui.button(label='Previous', style=discord.ButtonStyle.blurple)
|
||||
async def previous_comic(self, _, interaction: discord.Interaction):
|
||||
self.n -= 1
|
||||
|
|
|
@ -6,6 +6,8 @@ import discord
|
|||
from discord.ext import commands, tasks
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import config
|
||||
from utils import console, TimeTableDaySwitcherView
|
||||
from datetime import time, datetime, timedelta
|
||||
|
||||
|
@ -183,6 +185,8 @@ class TimeTableCog(commands.Cog):
|
|||
# @tasks.loop(time=schedule_times())
|
||||
@tasks.loop(minutes=5)
|
||||
async def update_status(self):
|
||||
if config.dev:
|
||||
return
|
||||
console.log("[TimeTable Updater Task] Running!")
|
||||
if not self.bot.is_ready():
|
||||
console.log("[TimeTable Updater Task] Bot is not ready, waiting until ready.")
|
||||
|
@ -202,7 +206,7 @@ class TimeTableCog(commands.Cog):
|
|||
message = _message
|
||||
break
|
||||
else:
|
||||
console.log(f"[TimeTable Updater Task] Sending new message in {channel.name!r}.", file=sys.stderr)
|
||||
console.log(f"[TimeTable Updater Task] Sending new message in {channel.name!r}.")
|
||||
message = await channel.send("[tt] (loading)")
|
||||
|
||||
message: discord.Message
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from rich.console import Console
|
||||
from rich import get_console
|
||||
|
||||
__all__ = ("console",)
|
||||
|
||||
console = Console()
|
||||
console = get_console()
|
||||
|
|
Loading…
Reference in a new issue