Skybot-dev / Skybot-rewrite

Rewrite of the Hypixel Skybot.
GNU General Public License v3.0
10 stars 11 forks source link

Error with scammer command #31

Closed 0xnim closed 3 years ago

0xnim commented 3 years ago

2021-01-10 19:21:33.977 | ERROR | main:on_command_error:170 - Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "/home/pi/Desktop/Skybot-rewrite/cogs/scammer.py", line 50, in report report_channel = report_guild.get_channel(config["support_guild"]["report_channel"]) AttributeError: 'NoneType' object has no attribute 'get_channel'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 902, in invoke await ctx.command.invoke(ctx) File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1340, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 864, in invoke await injected(*ctx.args, **ctx.kwargs) File "/home/pi/.local/lib/python3.7/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: 'NoneType' object has no attribute 'get_channel'

NoneType: None 2021-01-10 19:21:33.981 | ERROR | main:on_command_error:171 - Command raised an exception: AttributeError: 'NoneType' object has no attribute 'get_channel' NoneType: None

is the error. do i change discord.py? or whats the problem

patrickjonesuk commented 3 years ago

have you filled in config.json as shown in the config template, specifically "support_guild.ID" and "report_channel"?

0xnim commented 3 years ago

i have filled in report cahnnel but don't know how to get guild.id

patrickjonesuk commented 3 years ago

make sure that you have developer mode enabled in discord, then right click on your server's icon and click "copy id". You should do the same to get the IDs for report_channel, log_channel etc.

0xnim commented 3 years ago

i got the other ids

patrickjonesuk commented 3 years ago

which other IDs? Also, did adding the guild ID not fix it?

0xnim commented 3 years ago

It did work! I have all the stuff filled in except stats channel and message, all the trello stuff and I don't understand how the slothpixel API works.