@commands.command(description = "Send us a suggestion.", usage = "sug ", aliases = ["sug"]) async def suggest(self, ctx, *, message : str): data = await self.bot.get_data(ctx.guild.id) suggestions = self.bot.get_sug() suggestion_log = ctx.guild.get_channel(data[25]) if data[26] > self.suggestions: self.suggestions = data[26] else: self.suggestions += 1 suggestion = discord.Embed(colour = ctx.author.colour, title = f"Suggestion #{data[26]}", description = message) suggestion.set_author(name = ctx.author, icon_url = ctx.author.avatar_url) suggestion.set_footer(text = "Use the below reactions to up/down vote the suggestion") if len(ctx.message.attachments): # Checking if the orignal message contained a image suggestion.set_image(url = ctx.message.attachments[0].url) post = await suggestion_log.send(embed = suggestion) await post.add_reaction("") await post.add_reaction("") await ctx.reply(f"Your suggestion has been logged in {suggestion_log.mention} as suggestion {data[26]}") #sugs = await self.bot.get_sug(ctx.message.id) async with self.bot.pool.acquire() as conn: await conn.execute("UPDATE suggestions SET ctx.guild = $1, ctx.message.id = $2, post.id=$3, ctx.author.id = $4, message = $5 where suggestion = $3", ctx.guild.id, ctx.message.id, post.id, ctx.author.id, message, serial) await conn.execute("UPDATE data SET sugcount=$1 WHERE guild=$2", self.suggestions, ctx.guild.id,)