Comments (4)
You can but you'll have to do a little refactoring on the ready.js event having it register guild commands for the second server. but the one that does allowlisting you should have in the DiscordGuildId only since it fetches users from that server
from zdiscord.
Can you guide me in detail or I can wait if you have some future plan to execute any config like ::
CMDDiscordGuildId :
AllowListedDiscordGuildId :
!!!!!!!
from zdiscord.
I have no future plans to do this as fivem isn't really a suitable system to host a bot for anything quite so demanding. Also what I'm about to say is untested and may have some issues with permissions but as I was saying before to add support for another discord server you just need to duplicate these lines here https://github.com/zfbx/zdiscord/blob/djs/server/events/ready.js#L17-L19 and replace everywhere guild
is used with guild2
and that first line where it gets the server/guild ID replace it with the other server's ID and the bot will register commands for it. Alternatively you could replace the guild command registration with global command registration but it will break some things out of the box as the bot doesn't expect to receive slash command from DMs but could if registered globally.
But my 2 cents, In the end I really don't suggest doing this and instead suggest getting a bot hosted directly from nodejs outside of fivem.. in fact, an outside bot with hooks for fivem to use would be 10x better than zdiscord's implementation just because it would have its own thread and proper code, fivem does really weird stuff with scripting and I only made it like that for just being dead simple to add in and move around with a server for most people while not hammering the discord API as hard as other solutions do
from zdiscord.
I have no future plans to do this as fivem isn't really a suitable system to host a bot for anything quite so demanding. Also what I'm about to say is untested and may have some issues with permissions but as I was saying before to add support for another discord server you just need to duplicate these lines here https://github.com/zfbx/zdiscord/blob/djs/server/events/ready.js#L17-L19 and replace everywhere
guild
is used withguild2
and that first line where it gets the server/guild ID replace it with the other server's ID and the bot will register commands for it. Alternatively you could replace the guild command registration with global command registration but it will break some things out of the box as the bot doesn't expect to receive slash command from DMs but could if registered globally.But my 2 cents, In the end I really don't suggest doing this and instead suggest getting a bot hosted directly from nodejs outside of fivem.. in fact, an outside bot with hooks for fivem to use would be 10x better than zdiscord's implementation just because it would have its own thread and proper code, fivem does really weird stuff with scripting and I only made it like that for just being dead simple to add in and move around with a server for most people while not hammering the discord API as hard as other solutions do
Understand the whole thing dude !! Appreciated !! I suggest you watch Dr. Strange in the Multiverse of Madness for relaxing in life
from zdiscord.
Related Issues (20)
- [Feature] Connect queue HOT 2
- You don't have permission to use this command HOT 7
- question HOT 2
- Car spawn HOT 1
- Creating a Whitelisted command for fivem to use in discord. HOT 1
- how do you log things? HOT 2
- question and maybe bug? HOT 6
- Error using Screenshot HOT 5
- Item logs
- zDiscord commands for ESX HOT 6
- [BUG] Vehicle not storing correctly HOT 1
- webhook HOT 4
- hit a 429 HOT 8
- [BUG] Bot not stopping anyone? HOT 6
- [BUG/HELP] DiscordGuildid issue and i set my discord id correctly in config.js but its not working
- [BUG] HOT 2
- Whitelisting not working well HOT 1
- Export Other Player ID File HOT 3
- Discord Commands HOT 2
- [Feature]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zdiscord.