diff --git a/antipolls/antipolls.py b/antipolls/antipolls.py index 53974be..5c4877d 100644 --- a/antipolls/antipolls.py +++ b/antipolls/antipolls.py @@ -96,9 +96,9 @@ class AntiPolls(commands.Cog): failed: list[discord.Role] = [] for role in roles: if role.id in role_whitelist: - failed.extend(role) + failed.append(role) continue - role_whitelist.extend(role.id) + role_whitelist.append(role.id) await ctx.tick() if failed: await ctx.send(f"The following roles were already in the whitelist: {humanize_list(role.mention for role in failed)}", delete_after=10, allowed_mentions=discord.AllowedMentions.none) @@ -111,7 +111,7 @@ class AntiPolls(commands.Cog): failed: list[discord.Role] = [] for role in roles: if role.id not in role_whitelist: - failed.extend(role) + failed.append(role) continue role_whitelist.remove(role.id) await ctx.tick() @@ -139,9 +139,9 @@ class AntiPolls(commands.Cog): failed: list[discord.TextChannel] = [] for channel in channels: if channel.id in channel_whitelist: - failed.extend(channel) + failed.append(channel) continue - channel_whitelist.extend(channel.id) + channel_whitelist.append(channel.id) await ctx.tick() if failed: await ctx.send(f"The following channels were already in the whitelist: {humanize_list(channel.mention for channel in failed)}", delete_after=10, allowed_mentions=discord.AllowedMentions.none) @@ -154,7 +154,7 @@ class AntiPolls(commands.Cog): failed: list[discord.TextChannel] = [] for channel in channels: if channel.id not in channel_whitelist: - failed.extend(channel) + failed.append(channel) continue channel_whitelist.remove(channel.id) await ctx.tick()