mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
revert back to fetching guild & channel at every trigger
This commit is contained in:
1 file changed
+6
-4
@@ -7,13 +7,13 @@ class RepeatedMessages(commands.Cog):
|
||||
|
||||
def __init__(self, bot: commands.Bot):
|
||||
self.bot = bot
|
||||
self.uiog_server = self.bot.get_guild(747542543750660178)
|
||||
|
||||
@aiocron.crontab('0 0 * * 5')
|
||||
async def fredag():
|
||||
"""Sends a message on Friday at 00:00"""
|
||||
|
||||
channel = await self.uiog_server.fetch_channel(747542544291987597)
|
||||
guild = self.bot.get_guild(747542543750660178)
|
||||
channel = guild.get_channel(747542544291987597)
|
||||
await channel.send(
|
||||
'NU ÄR DET FREDAG!\n' +
|
||||
'https://cdn.discordapp.com/attachments/750052141346979850/851216786259181578/video0.mp4'
|
||||
@@ -23,7 +23,8 @@ class RepeatedMessages(commands.Cog):
|
||||
async def mandag():
|
||||
"""Sends a message on Monday at 00:00"""
|
||||
|
||||
channel = await self.uiog_server.fetch_channel(747542544291987597)
|
||||
guild = self.bot.get_guild(747542543750660178)
|
||||
channel = guild.get_channel(747542544291987597)
|
||||
await channel.send(
|
||||
'ENDELIG MANDAG!\n\n' +
|
||||
'https://cdn.discordapp.com/attachments/678396498089738250/862853827278929940/hvorfor_de_rike_br_spises.mp4'
|
||||
@@ -33,7 +34,8 @@ class RepeatedMessages(commands.Cog):
|
||||
async def new_year():
|
||||
"""Sends a message on New Year's Day at 00:00"""
|
||||
|
||||
channel = await self.uiog_server.fetch_channel(747542544291987597)
|
||||
guild = self.bot.get_guild(747542543750660178)
|
||||
channel = guild.get_channel(747542544291987597)
|
||||
await channel.send(
|
||||
'GODT NYTTÅR!\n\nNå, meld dere inn i UiO Gaming igjen <:ThisIsAThreat:874998234072903710>'
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user