Fixed bumping as well as invite command
Bumping was broken due to it trying to fetch an invite for every server it wanted to send the ad to instead of for the server that was sending the ad. Invite was broken because you didnt call a method in the class or some shit.
This commit is contained in:
@@ -41,6 +41,8 @@ class Bumps(commands.Cog):
|
||||
|
||||
success, fail = 0, 0
|
||||
|
||||
|
||||
invite_channel = self.bot.get_channel(server.get()['invite'])
|
||||
invite = await invite_channel.create_invite(max_uses=0, max_age=0, unique=False)
|
||||
|
||||
embed = discord.Embed(
|
||||
@@ -61,7 +63,6 @@ class Bumps(commands.Cog):
|
||||
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'],
|
||||
|
||||
@@ -38,7 +38,7 @@ class Info(commands.Cog):
|
||||
@commands.guild_only()
|
||||
@commands.command(aliases=["add"])
|
||||
async def invite(self, ctx):
|
||||
return await ctx.send(embed=Embeds(f"[Click here to invite me!](https://discord.com/api/oauth2/authorize?client_id={self.bot.user.id}&permissions=537152577&scope=bot)"))
|
||||
await ctx.send(embed=discord.Embed(title="Invte me to your server!", description=f"[Click here to invite me!](https://discord.com/api/oauth2/authorize?client_id={self.bot.user.id}&permissions=537152577&scope=bot)", color=discord.Color.green()))
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Info(bot))
|
||||
Reference in New Issue
Block a user