GithubHelp home page GithubHelp logo

Can i use this script to run 2 dicord server !! 1 For Discord Allowlisted and 1 for Admin Works Like Ban Kick and all !!! about zdiscord HOT 4 CLOSED

zfbx avatar zfbx commented on May 24, 2024
Can i use this script to run 2 dicord server !! 1 For Discord Allowlisted and 1 for Admin Works Like Ban Kick and all !!!

from zdiscord.

Comments (4)

zfbx avatar zfbx commented on May 24, 2024

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.

subhampro avatar subhampro commented on May 24, 2024

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.

zfbx avatar zfbx commented on May 24, 2024

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.

subhampro avatar subhampro commented on May 24, 2024

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

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.