Raised This Month: $305 Target: $400
 76%   Almost there!

[ANY] Discord Report


Post New Thread Reply   
 
Thread Tools Display Modes
KiddleyWiffers
Junior Member
Join Date: Aug 2017
Old 02-23-2019 , 22:40   Re: [ANY] Discord Report
Reply With Quote #31

Code:
        admin = guild.roles.find("name", config.adminRole);
                      ^

TypeError: Cannot read property 'roles' of null
    at Client.client.on (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\reportBot.js:45:16)
    at Client.emit (events.js:194:15)
    at WebSocketConnection.triggerReady (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:125:17)
    at WebSocketConnection.checkIfReady (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:141:61)
    at GuildCreateHandler.handle (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\packets\handlers\GuildCreate.js:13:31)
    at WebSocketPacketManager.handle (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\dahou\Desktop\Development files\Sourcemod (All)\reportBot\Bot Files\node_modules\discord.js\node_modules\ws\lib\event-target.js:120:16)
    at WebSocket.emit (events.js:189:13)
I am getting this error. I honestly don't know what the problem is since I have a role set in the config. I didn't move any of the Parenthesis, Commas, ect. as far as I can tell. Please help!

My config:
Code:
var config = {
	admins: ["-snipped-"], // people without the admin role that are allowed to use the bot, this is their discord ID
	serverID: "-snipped-", // discord server ID
	host: "", // MySQL IP or hostname
	user: "admin", // MySQL username
	password: "", // MySQL password
	database: "garbage_reports", // MySQL database
	reportsDB: "reports", // MySQL report location can't really change this 
	blockedDB: "blocked", // MySQL blocked location can't really change this
	channelName: "reports", // Channel the bot will post reports in, create the channel before running the bot!
	commandStr: "!ms ", // !ms block 76561198023897791
	SteamAPIKey: "-snipped-", // SteamAPI Key https://steamcommunity.com/dev/api
	adminRole: "Owner", // The role name of people that should be able to use the bot
	token: "-snipped-" // Bot Token
}
module.exports = config;
KiddleyWiffers is offline
xantis
Junior Member
Join Date: Feb 2019
Old 05-22-2019 , 10:07   Re: [ANY] Discord Report
Reply With Quote #32

I did everything but it says Couldn't send your report! everytime
xantis is offline
SteweX
New Member
Join Date: Apr 2020
Old 04-05-2020 , 08:53   Re: [ANY] Discord Report
Reply With Quote #33

Guys, i need help. When i trying to login the bot it showed this messages.

Error: Cannot find module 'request'
Require stack:
- C:\Users\Админ\Desktop\reportbot\BotFiles\rep ortBot.js
 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
 at Function.Module._load (internal/modules/cjs/loader.js:859:27)
 at Module.require (internal/modules/cjs/loader.js:1036:19)
 at require (internal/modules/cjs/helpers.js:72:1
at Object.<anonymous> (C:\Users\Админ\Desktop\reportbot\BotFiles\re portBot.js:4:15)
 at Module._compile (internal/modules/cjs/loader.js:11470)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
 at Module.load (internal/modules/cjs/loader.js:9962)
 at Function.Module._load (internal/modules/cjs/loader.js:896:14)
 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\Users\\Админ\\Desktop\\reportbot\\Bot Files\\reportBot.js' ]
}
SteweX is offline
WinCher58
Junior Member
Join Date: Nov 2020
Old 01-24-2021 , 19:30   Re: [ANY] Discord Report
Reply With Quote #34

Quote:
Originally Posted by SteweX View Post
Guys, i need help. When i trying to login the bot it showed this messages.

Error: Cannot find module 'request'
Require stack:
- C:\Users\Админ\Desktop\reportbot\BotFiles\rep ortBot.js
 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
 at Function.Module._load (internal/modules/cjs/loader.js:859:27)
 at Module.require (internal/modules/cjs/loader.js:1036:19)
 at require (internal/modules/cjs/helpers.js:72:1
at Object.<anonymous> (C:\Users\Админ\Desktop\reportbot\BotFiles\re portBot.js:4:15)
 at Module._compile (internal/modules/cjs/loader.js:11470)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
 at Module.load (internal/modules/cjs/loader.js:9962)
 at Function.Module._load (internal/modules/cjs/loader.js:896:14)
 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\Users\\Админ\\Desktop\\reportbot\\Bot Files\\reportBot.js' ]
}
npm install request
WinCher58 is offline
OG420
Junior Member
Join Date: Feb 2021
Old 04-09-2021 , 12:19   Re: [ANY] Discord Report
Reply With Quote #35

Could someone please explain me the installation process more in detail please? I am completely new to this stuff. Thank you.
OG420 is offline
OG420
Junior Member
Join Date: Feb 2021
Old 04-30-2021 , 13:01   Re: [ANY] Discord Report
Reply With Quote #36

Hi, iam having these errors after starting the bot. Could someone help me please?

Code:
C:\Users\User\Desktop\plugs\reportBot\Bot Files>node reportBot.js
(node:1152) UnhandledPromiseRejectionWarning: TypeError: client.guilds.find is not a function
    at Client.<anonymous> (C:\Users\User\Desktop\plugs\reportBot\Bot Files\reportBot.js:44:24)
    at Client.emit (events.js:315:20)
    at WebSocketManager.triggerClientReady (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketManager.js:431:17)
    at WebSocketManager.checkShardsReady (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketManager.js:415:10)
    at WebSocketShard.<anonymous> (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketManager.js:197:14)
    at WebSocketShard.emit (events.js:315:20)
    at WebSocketShard.checkReady (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketShard.js:475:12)
    at WebSocketShard.onPacket (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketShard.js:447:16)
    at WebSocketShard.onMessage (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\User\Desktop\plugs\reportBot\Bot Files\node_modules\ws\lib\event-target.js:132:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1152) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1152) [DEP0018] DeprecationWarning: Unhandled promise rejections
OG420 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:17.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode