Discord JS Per-Server Command Prefix (2020) [Episode #33]

preview_player
Показать описание

🙋‍♂️ Need help? Ask in our Discord community:

📺 Watch more Discord.JS videos here:

💡 Have an idea for a video or course? Request it here:

------------------------------

🕒 Timestamps:
00:00 Introduction
00:23 Set prefix command
01:35 Creating our schema
06:30 Using the dynamic prefix
12:03 Outro

#discordjs #discordbots #wornoffkeys

FTC Legal Disclaimer - Some links found in my video descriptions might be affiliate links, meaning I will make commission on sales you make through my link. This is at no extra cost to you and it helps support the channel so I can make more free YouTube videos.
Рекомендации по теме
Комментарии
Автор

🧠 Learn website dashboards + bot monetization:
levelupyourbot.com
🙋‍♂ Need help? Ask in our Discord community:
wornoffkeys.com/discord

WornOffKeys
Автор

Hey dude. I know this comment is a little late, but I was wondering how you can only use a certain command for a specific Discord user ID. For an example, if I wanted to use a meme command that ONLY sends it if I execute the command, and for others it would not respond.

Crunchiest
Автор

hi! I know im really late since this upload but in the code at 1:48, my code shows an error message when i write the callback. it says message, arguments and text aren't defined. How can I fix that?

pxndah
Автор

I have a problem. Every time I restart my bot it goes back to the default prefix, even though the new prefix is saved in mongoDB

nolanpieters
Автор

Hey, I followed along with the entire tutorial, added the missing things from the directories, played around with some things and it's still not working, can you help?

MewThree
Автор

So I have 5 different pat gifs but it can only send one when I add the other pat gifs to the coding it sends all 5 at the same time how do I make the pat gifs randomized?

cyphrix
Автор

I'm getting an error.
MongoError: topology was destroyed
What does that mean?

advertisingboat
Автор

if i have a help command with the prefix inside, it will not show the new one. how do i fix that : (

waash
Автор

I am working with your code and I have a problem on line 151. Hope you can explain what the error is so that I can find a solution.

Line 151: guildPrefixes[guildId] = result.prefix
Error: Cannot read property 'prefix' or null

Thank you

omargreen
Автор

Hey! Everytime I restart my bot for a new update for example, the custom servre prefix appears to be reset to the global prefix. They are stored in MongoDB.

Skyline-ywwn
Автор

Hi, i tried putting it in my heroku, and i found that it isn't whitelist, i meant its ip isnt whitelist, can you help me with that? there is alot of ip ranged in use but idk which one to use, i tried one but it doesn't work, and im kinda bad at english so pls help

pxdav
Автор

Your channel is so underrated my guy u need the subs and views great videos

ClappingHere
Автор

what you can see here in the video seems to be not yet fully developed.
1. as soon as a new server wants to use the bot it switches itself off because it can't find the prefix in the DB
This can be bypassed by

if(result === null) {
return
}

in the for loop.

But
2. now you can't test if you can leave this in the loop because other commands don't work anymore. The commands still use the config for the prefix, but at the same time they use the DB and nothing works anymore. And if I delete what I inserted, the other commands still don't work.

Don't get me wrong, I like your videos a lot but the prefix video doesn't work. Maybe it is because of me, that I did something wrong. I haven't watched the following videos yet, maybe they show how to solve the problem. :)

trikru
Автор

sorry that I'm very late. Just so you know. Yes this works but it doesn't work on the older commands btw.

boi_tj
Автор

hey! could you make a video by creating a command in repl.it? I liked your videos but I don’t know how i could put a command there (like the economy command)

bernardopedro
Автор

Thanks for the video, it thought me a lot! Is there a way to not have the bot break when direct messaging it?

reco
Автор

pls can you do vedio how to clear and number like !clear 10

amengaming
Автор

stop using visual studio its trash every time i open up it crashes

asleeper