rilecraft / discordbot-template Goto Github PK
View Code? Open in Web Editor NEWA bot template with command , event , button , selectmenus , slashcommands handler and error handlers. Made in Discord.JS V14
License: MIT License
A bot template with command , event , button , selectmenus , slashcommands handler and error handlers. Made in Discord.JS V14
License: MIT License
It's possible, for you give us more info on you non client event, how it's work ?
it's for custom event, like one streamer up his stream and that mat an event or other thing ?
Describe the issue
Some times bot the commands are not running, I know because the idea is global but any idea to fix or skip this problem from the last update yesterday
To Reproduce
Steps to reproduce the behavior:
See error
Host Details:
if(i.member.id != interaction.user.id) {
return i.reply({ content: This interaction is not for you
, ephemeral: true})
}
This Code Dosent work in btn handlar
Describe the issue
Slash Command not load
Expected behavior
Problem show with last update (before 8 hours)
iam test in test guild and active guild command iam mean like that guild:["my guild test"],
and if add new command not load
iam try delete bot after that made bot and inite to guild ,all slash command not loaded
iam check if invite with applications.commands
and yep iam invite with this scope
before this update everything work 100%
thx for help
You might as well make a system where we can change the bot prefix by command, so you can have a different prefix for each guild
Describe the issue
When trying to install the newest version I get a ERR_UNSUPPORTED_ESM_URL_SCHEME error. I just followed the install guide in the readme
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would extect the bot to start, but I got an error.
Screenshots
Screenshot of the error:
Screenshot of my package.json file:
Screenshot of the return I got when I ran the npm install command (I know it can't be used to anything but attached it anyway):
Host Details:
Describe the issue
Select menus won't respond when I create a new select menu and then create a new select menu with the name set as the customId for the select menu, I have read the documentation, it says that I can either put the custom ID of the select menu or one of the option values. When I put the value, it works, but when I use the custom ID it does not and I know your probably gonna say "Well just use the values" but I don't want to as it means I have to create like 13 different files for one command and I don't want to do that. Is it something that I am doing wrong, or is something that is wrong with code.
When I use the select menu with the custom id, nothing happens nothing is logged in the console.
Link to the video
Host Details:
Additional context
Is it something that I am doing wrong, or is it something wrong with the source code?
Well in fact, i have two errors. the first is the bot always stops responding after a certain time (it's not my host i checked with multiple bots). and the second sometimes it says in the console:
Loaded undefined commands/selectMenu/buttons/Events.
when I run a slash command it gives this error on the terminal,
It doesn't always happen, sometimes the command works normally, but other times it doesn't work and this error occurs in the terminal.
[Error Mensagem] DiscordAPIError: Unknown interaction
[Error Localização] at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:349:13)
You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
Name of the feature
TypeScript bot
What will this feature do?
You can do another repo or in this repo another bot but with TypeScript with the same commandOpts, etc...
Describe the issue
When a member thats not a developer exceute a developers command like eval
, it excute the command and after it send the message for ownerOnly. I have not errors
To Reproduce
I don't know what I changed
Expected behavior
don't execute the command
Host Details:
Additional context
I test with the template so I change nothing in the conde just the Config.js and it work and I changed the messageCreate with the original and it dosen't work too so, it don't execute the command. So I need to know where I need to look for execute the loadCommandOption and after the command
Could you at least say in which file I can make the customizable prefix? MessageCreate or LoadCommandOptions, please.
Host on github pages rather than personel website
Hosting docs on Github Pages will be good due to expired domain.
What will this feature do?
It will make docs available again and also cut the cost of domain and hosting.
Name of the feature
User Options, String Options
What will this feature do?
i don't know if it exist buts its like d.js slashcommandbuilder, like .addstringoption(), .adduseroption()
Additional context
if it already exist tell me on how to do use it
found the issue
Name of the feature
Context Menu
What will this feature do?
Iam hope add Context Menu in this project
When I USE interaction Its Give Me This ERR :
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:640:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async BurstHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:736:23)
at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async ChatInputCommandInteraction.reply (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Object.run (/home/container/Src/Interactions/SlashCommands/Global/slashCommands/Moderation 🗼/Ban.js:60:4)
at async Object.run (/home/container/Src/Events/InteractionCreate.js:19:49) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1100492361219457095/aW50ZXJhY3Rpb246MTEwMDQ5MjM2MTIxOTQ1NzA5NTpYcE1JeVpZNERMNjdQdFJHSG95QU5YZHVGZ3F5SUpTeVVydTJYVWR1aHpoUEdwR2hTNzNUU1pORDlqN3kwY3doRDA3VHF2eVZhazY0NEo5WWxjZThpQjhCQ3ZoZ3VEZDhCM1RaU01wMTNpaGJOUTFlMlBoVmwwYlRjeHM1NXdaRA/callback'
}
const {MessageEmbed} = require('discord.js')
module.exports = {
name: "ban",
description: "Run this to ban a member",
guilds: ['778284574479482910','927848261207875595'],
run: async(client,message ,interaction) => {
if(!interaction.member.permission.has("BAN_MEMBERS"))
return interaction.followUp({content: "Tu n'as pas les permissions pour utiliser cette commande", ephemeral: true})
const user = interaction.options.getUser('user')
const member = interaction.guild.members.cache.get(user.id) || await interaction.guild.members.fetch(user.id).catch(err => {})
if(!member) return interaction.followup("😅 | Je ne peux pas avoir les details de se membre");
const reason = interaction.options.getString('reason');
if(!member.bannable || member.user.id === client.user.id)
return interaction.followUp("😅 | Je ne peux pas ban ce membre");
if(interaction.member.role.highest.position <= member.roles.highest.position)
return interaction.followUp('Certains membres ont un rang supérieur ou égal au vôtre, je ne peux donc pas les bannir.')
const ban = new MessageEmbed()
.setDescription(`**${member.user.tag}** a été bannie de se serveur pour \`${reason}\``)
.setColor('RANDOM')
.setFooter({text: 'Ban Member'})
.setTimestamp()
await member.user.send(`Tu as étais bannie de **\`${interaction.guild.name}\`** for \`${reason}\``).catch(err => {})
await member.ban({reason})
return interaction.followUp({embeds: [ban]})
}
}
Describe the issue
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Host Details:
Additional context
Add any other context about the problem here.
Name of the feature
Add this as a genuine Github Template rather than just a template repo to allow easier use.
What will this feature do?
Allow devs to click the "Use Template" button to clone a repository for their use.
Additional context
Instructions on creating a template repository.
I added my own guildMemberAdd.js event from a tutorial and tweaked it a little bit.
Code - https://pastebin.com/v5A6mxLV
I've contacted discord.js public support but they told me i didnt define my root in "loadEvents.js Line 16"
What should I do?
(and yes i know i mentioned "discord-js", I already corrected that)
I constantly have this error. Is there a way to fix this?
I juste clone the project, and change config.js but slash command doesn't load after 30 min
OS : Win 11
Node : 16.13.1
first thx for new big update
it is nice and eazy to read and learn
Describe the issue
1.
eval command if use button he will show this error and not delete button
2.
bot not load in console log ... but bot it running iam ..test ping command and he run
but in console log not show anything
3.
iam made command and add userPermissions but he tell me not have permmison
and iam owner server hhhhh
Describe the issue
The ping command doesn't show actual results
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Bot should give us the real ping and not unreal results
Host Details:
Additional context
None
When I install the modules using:
npm -i
It says
up to date, audited 1 package in 856ms
found 0 vulnerabilities```
I thought It installed it but the node says it wasn't.
` if (!command.cooldown) return false;
^
TypeError: Cannot read properties of undefined (reading 'cooldown')
at module.exports (/home/runner/saitama/Root/Classes/CommandOptions/Cooldown.js:2:18)
at module.exports (/home/runner/saitama/Root/Classes/CommandOptions/loadCommandOptions.js:5:75)
at Object.run (/home/runner/saitama/Root/Events/InteractionCreate.js:5:37)
at Client. (/home/runner/saitama/Root/Classes/Handlers/loadEvents.js:16:55)
at Client.emit (node:events:402:35)
at InteractionCreateAction.handle (/home/runner/saitama/node_modules/discord.js/src/client/actions/InteractionCreate.js:70:12)
at Object.module.exports [as INTERACTION_CREATE] (/home/runner/saitama/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/runner/saitama/node_modules/discord.js/src/client/websocket/WebSocketManager.js:350:31)
at WebSocketShard.onPacket (/home/runner/saitama/node_modules/discord.js/src/client/websocket/WebSocketShard.js:443:22)
at WebSocketShard.onMessage (/home/runner/saitama/node_modules/discord.js/src/client/websocket/WebSocketShard.js:300:10)`
Describe the issue
iam use rainway host and he is perfect
but sometimes show this error idk why
[UnhandledPromiseRejection: 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(). The promise rejected with the reason "#".] {
code: 'ERR_UNHANDLED_REJECTION'
}
he say in promise so iam think because slash halnder or what?
iam try fix it but can't fixed
Updating About section of repo
About section should be updated like this since D.js version is V14
A bot template with command , event , button , selectmenus , slashcommands , contextmenus handler and error handlers. Made in Discord.JS V14
What will this feature do?
Easier access to people in need.
Additional context
NaN
Look Like Normal Message Time Out
Name of the feature
Eg: Mongo DB support
What will this feature do?
it will support database to save level system, warn, etc
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.