You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i succesfully run the bot but when i write the commands nothing happen and this is what it says
bot is now online
Ignoring exception in command h:
Traceback (most recent call last):
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "nuker.py", line 110, in h
for user in list(ctx.message.server.members):
AttributeError: 'Message' object has no attribute 'server'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\bot.py", line 902, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\core.py", line 864, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Message' object has no attribute 'server'
The text was updated successfully, but these errors were encountered:
It looks like you are running a Discord bot using Python and the Discord.py library. The error message suggests that there is an issue with the "rape" command in your code, specifically with the line "for channel in list(ctx.message.server.channels)". The error message states that the 'Message' object (i.e., ctx.message) does not have an attribute 'server'.
This error message is likely caused by the fact that Discord.py version 1.0+ no longer supports the "server" attribute on message objects. Instead, you should use "guild" instead of "server".
To fix this issue, you should modify the "rape" command to use "ctx.guild" instead of "ctx.message.server". For example, you can replace the problematic line with:
for channel in ctx.guild.channels:
This should resolve the AttributeError and allow the "rape" command to run correctly.
i succesfully run the bot but when i write the commands nothing happen and this is what it says
bot is now online
Ignoring exception in command h:
Traceback (most recent call last):
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "nuker.py", line 110, in h
for user in list(ctx.message.server.members):
AttributeError: 'Message' object has no attribute 'server'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\bot.py", line 902, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\core.py", line 864, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\erosa\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Message' object has no attribute 'server'
The text was updated successfully, but these errors were encountered: