LengoLabs / qbot

Qbot is an advanced, easy to setup, free, and unbranded Discord-Roblox ranking bot. If at any time during setting it up you need assistance, you can join the support server.
https://discord.gg/J47m7t4
MIT License
77 stars 138 forks source link

Getroles command help #59

Closed ImperiumLacrima closed 3 years ago

ImperiumLacrima commented 3 years ago

const Discord = require('discord.js'); const roblox = require("noblox.js"); exports.run = async (client, message, args) => {

const foundId = roblox.getIdFromUsername(message.guild.member.displayName) const groupRank = roblox.getRankNameInGroup(7745739, foundId)

message.member.roles.add(message.guild.roles.cache.find(role => role.name === groupRank)); // Add the users role

const e = new Discord.MessageEmbed() .setColor('BLUE') .setTitle(Prompt Concluded) .addField("Added Roles", ${groupRank}) .setFooter("Action: Getroles") message.channel.send(e) }

ImperiumLacrima commented 3 years ago

Error is (node:97) UnhandledPromiseRejectionWarning: Error: Required argument "username" is missing at Object.getIdFromUsername (/home/runner/TAS-Assistant/node_modules/noblox.js/lib/internal/wrap.js:69:19) at Object.exports.run (/home/runner/TAS-Assistant/commands/role.js:4:26) at Client. (/home/runner/TAS-Assistant/index.js:108:31) at Client.emit (events.js:315:20) at Client.EventEmitter.emit (domain.js:483:12) at MessageCreateAction.handle (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31) at WebSocketShard.onPacket (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) at WebSocketShard.onMessage (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10) at WebSocket.onMessage (/home/runner/TAS-Assistant/node_modules/ws/lib/event-target.js:125:16) at WebSocket.emit (events.js:315:20) at WebSocket.EventEmitter.emit (domain.js:483:12) at Receiver.receiverOnMessage (/home/runner/TAS-Assistant/node_modules/ws/lib/websocket.js:797:20) at Receiver.emit (events.js:315:20) at Receiver.EventEmitter.emit (domain.js:483:12) at Receiver.dataMessage (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:437:14) at Receiver.getData (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:367:17) at Receiver.startLoop (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:143:22) at Receiver._write (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:78:10) at doWrite (_stream_writable.js:403:12) at writeOrBuffer (_stream_writable.js:387:5) (node:97) 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: 3) (node:97) UnhandledPromiseRejectionWarning: Error: Required argument "username" is missing at Object.getIdFromUsername (/home/runner/TAS-Assistant/node_modules/noblox.js/lib/internal/wrap.js:69:19) at Object.exports.run (/home/runner/TAS-Assistant/commands/role.js:4:26) at Client. (/home/runner/TAS-Assistant/index.js:108:31) at Client.emit (events.js:315:20) at Client.EventEmitter.emit (domain.js:483:12) at MessageCreateAction.handle (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31) at WebSocketShard.onPacket (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) at WebSocketShard.onMessage (/home/runner/TAS-Assistant/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10) at WebSocket.onMessage (/home/runner/TAS-Assistant/node_modules/ws/lib/event-target.js:125:16) at WebSocket.emit (events.js:315:20) at WebSocket.EventEmitter.emit (domain.js:483:12) at Receiver.receiverOnMessage (/home/runner/TAS-Assistant/node_modules/ws/lib/websocket.js:797:20) at Receiver.emit (events.js:315:20) at Receiver.EventEmitter.emit (domain.js:483:12) at Receiver.dataMessage (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:437:14) at Receiver.getData (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:367:17) at Receiver.startLoop (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:143:22) at Receiver._write (/home/runner/TAS-Assistant/node_modules/ws/lib/receiver.js:78:10) at doWrite (_stream_writable.js:403:12) at writeOrBuffer (_stream_writable.js:387:5) (node:97) 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: 4)

ImperiumLacrima commented 3 years ago

image

ImperiumLacrima commented 3 years ago

Hello?

IeuanGol commented 3 years ago

Hi! Since this is not an error relating to qBot we aren't providing support for it (we will when we open our discord server again).

ImperiumLacrima commented 3 years ago

Whens that its been locked for a few weeks

ImperiumLacrima commented 3 years ago

K

IeuanGol commented 3 years ago

This server might be able to help.

TypicallyShad commented 3 years ago

Server now unlocked - there is a qbot plugin for that too which I made.

ImperiumLacrima commented 3 years ago

Where? @TypicallyShad

IeuanGol commented 3 years ago

https://discord.gg/976dpbB

jackfrojpg-rblx commented 3 years ago

@TypicallyShad Where is the plug-in you made? Cannot find it.

IeuanGol commented 3 years ago

We have a #plugins channel in our server.

IeuanGol commented 3 years ago

https://github.com/yogurtsyum/qbot-plugins/blob/master/directory.md

jackfrojpg-rblx commented 3 years ago

There is no getroles plugin whatsoever.

Have you misread? There’s getinfo but not getroles.

[tag on this original message was a mistake, edited]

ImperiumLacrima commented 3 years ago

Server now unlocked - there is a qbot plugin for that too which I made.

Theres no get roles plugin..

jackfrojpg-rblx commented 3 years ago

Theres no get roles plugin..

Indeed.

ghost commented 3 years ago

No getroles in #plugins

yogurtsyum commented 3 years ago

If you need any more help, please ask in the support server.

ImperiumLacrima commented 3 years ago

Ok