Finally got it working I think

pull/9/head
sgoudham 4 years ago
parent 75765deae8
commit 084c97fdd2

@ -91,7 +91,6 @@ async def send_starboard_and_update_db(self, payload, action):
else: else:
if new_stars >= self.bot.get_starboard_min_stars(payload.guild_id): if new_stars >= self.bot.get_starboard_min_stars(payload.guild_id):
self.bot.cache_store_starboard_message(message.id, payload.guild_id, star_message.id) self.bot.cache_store_starboard_message(message.id, payload.guild_id, star_message.id)
self.bot.update_starboard_message(message.id, payload.guild_id, new_stars)
else: else:
self.bot.cache_store_starboard_message(message.id, payload.guild_id, None) self.bot.cache_store_starboard_message(message.id, payload.guild_id, None)
@ -102,7 +101,7 @@ async def send_starboard_and_update_db(self, payload, action):
else: else:
if new_stars >= self.bot.get_starboard_min_stars(payload.guild_id) and not msg_id: if new_stars >= self.bot.get_starboard_min_stars(payload.guild_id) and not msg_id:
star_message = await channel.send(embed=embed) star_message = await channel.send(embed=embed)
else: elif msg_id:
try: try:
star_message = await channel.fetch_message(msg_id) star_message = await channel.fetch_message(msg_id)
await star_message.edit(embed=embed) await star_message.edit(embed=embed)

Loading…
Cancel
Save