@commands.command()
async def archive(self, ctx, *, reason: str = None):
emojiyes = self.client.get_emoji(id)
emojino = self.client.get_emoji(id)
emojihz = self.client.get_emoji(id)
for guild in self.client.guilds:
if guild.id == config.serverid:
role = discord.utils.get(guild.roles, id=)
if reason == None:
ctx.reply("Укажите причину архивации!")
elif role in ctx.author.roles:
if ctx.message.reference and (msg := ctx.message.reference.resolved) and isinstance(msg, discord.Message):
current_date_time = datetime.datetime.now()
now_date = current_date_time.time()
emb = discord.Embed(title = 'Архивация', color = discord.Color.red())
emb.set_author(name = f"{msg.author.name} от {current_date_time.hour}:{current_date_time.minute}/{current_date_time.day}.{current_date_time.month}.{current_date_time.year}", icon_url = msg.author.avatar_url)
emb.add_field(name = 'Предложение'.format(msg.content), value = '{}'.format(msg.content))
emb.add_field(name = 'Как прошло голосование?'.format("Количество yes/Количество no/Количество hz")), value = '{}'.format("Количество yes/Количество no/Количество hz"))
emb.add_field(name = 'Почему архивировано?'.format(reason), value = '{}'.format(reason))
emb.set_footer(text = f'{ctx.author} архивировал это предложение.'.format(ctx.author.name), icon_url = ctx.author.avatar_url)
channel = discord.utils.get(ctx.author.guild.channels, id=)
await channel.send(f"{msg.author.mention}, ваше предложение было архивировано!")
await channel.send(embed = emb)
else:
ctx.reply("Вы не архивист!")