Update bump.py
This commit is contained in:
14
cogs/bump.py
14
cogs/bump.py
@@ -41,18 +41,12 @@ class Bumps(commands.Cog):
|
||||
|
||||
success, fail = 0, 0
|
||||
|
||||
for entry in servers:
|
||||
try:
|
||||
server = self.bot.get_guild(entry['_id'])
|
||||
webhook = await self.bot.fetch_webhook(entry['webhook'])
|
||||
invite_channel = self.bot.get_channel(entry['invite'])
|
||||
|
||||
invite = await invite_channel.create_invite(max_uses=0, max_age=0, unique=False)
|
||||
|
||||
embed = discord.Embed(
|
||||
title=guild.name,
|
||||
description=entry['description'],
|
||||
color=discord.Color(value=entry['color']),
|
||||
description=server.get()['description'],
|
||||
color=discord.Color(value=server.get()['color']),
|
||||
url=invite.url
|
||||
)
|
||||
|
||||
@@ -64,6 +58,10 @@ class Bumps(commands.Cog):
|
||||
embed.set_thumbnail(url=guild.icon_url_as(static_format="png"))
|
||||
embed.set_footer(text=f"Powered by • {self.config['bot_name']}")
|
||||
|
||||
for entry in servers:
|
||||
try:
|
||||
webhook = await self.bot.fetch_webhook(entry['webhook'])
|
||||
invite_channel = self.bot.get_channel(entry['invite'])
|
||||
|
||||
await webhook.send(
|
||||
username=self.config['bot_name'],
|
||||
|
||||
Reference in New Issue
Block a user