use bot.vote_channel and wait for after ready event
@@ -17,6 +17,7 @@ class Webhooks(commands.Cog):
self.k = bot.k
self.db = bot.get_cog("Database")
+ self.events = bot.get_cog("Events")
self.ipc = bot.ipc
self.server_runner = None
@@ -75,7 +76,8 @@ class Webhooks(commands.Cog):
user = self.bot.get_user(user_id)
user_str = "an unknown user" if user is None else discord.utils.escape_markdown(user.display_name)
- await self.bot.get_channel(self.d.vote_channel_id).send(f":tada::tada: **{user_str}** has voted! :tada::tada:")
+ await self.events.after_ready.wait()
+ await self.bot.vote_channel.send(f":tada::tada: **{user_str}** has voted! :tada::tada:")
if user is not None:
try:
