#Bot is unable to edit channel attributes
1 messages · Page 1 of 1 (latest)
When I change the channel description the first time, it works
but when i do it a second time it doesn't work
The entire command is
async def add_milestone(ctx, name):
if not name:
member = bot.guild.get_member(int(ctx.channel.topic.split("|")[0]))
name = await name_grabber(member)
class MilestoneTypeSelect(discord.ui.Select):
def __init__(self):
super().__init__()
for key, value in milestone_emojis.items():
self.add_option(label=key, emoji=f"{value}")
# Override default callback
async def callback(self, interaction: discord.Interaction):
# Set option var and delete Select so it cannot be used twice
option = list(interaction.data.values())[0][0]
option_emoji = milestone_emojis.get(option)
channel = ctx.channel
await interaction.response.send_message(f"**Milestone Category:** {option}"
f"\n**What is {name}'s milestone?**\n"
f"{option_emoji}{name}.... (Complete the sentence)")
milestone = await bot.wait_for("message",
check=lambda
x: x.channel == channel and x.author == interaction.user)
milestone_message = f"{option_emoji} {member.mention} {milestone.content}|"
channel_description = channel.topic + milestone_message
try:
await channel.edit(topic=str(channel_description))
except Exception as e:
print(e)
embed = discord.Embed(title="Milestone Registered!",
description=milestone_message[:-1], color=neutral_color)
await ctx.send(embed=embed)
Do you get any error?
No error at all
So doesn't work at the second time
That's weird
This just happened. This is from a different channel where I was messing around.
8 minutes to edit a channel topic?
.
channel edits have pretty hard rate limits set by discord, so you have to be patient
e.g. editing the name is like 2 per 10 mins