View Single Post
Deathknife
Senior Member
Join Date: Aug 2014
Old 01-09-2017 , 12:30   Re: [ANY] Discord API (Send/Retrieve messages, list Guilds/Channels)
Reply With Quote #9

Quote:
Originally Posted by Xenoadria View Post
Seems great. Planning to get this work first thing tommorow, however I am having some concerns.
I'm having more than 1 server, 4 to be exact. Making a configuration, and putting the same configuration on all the servers would make all calladmin messages arrive at same channel on discord meaning I wouldnt be able to recognize from which server the report came ? Same thing goes for the announcements, if it's same configuration, writing an announcement on the discord would send the announcement on every server ?
Am I mistaking somewhere ?
So I'm asking, is it possible somehow to make this plugin to "search" for different named channels to send messages on discord (meaning I need to create only more channels on discord) or for the specific situation that I am having (4 servers and would like to have calladmin and announcements on all of them seperatly), I would need to make 4 bots with more differently named channels?

Maybe some of this is stupid, but I was just curiuos. Once again I love this and good job for the idea.

Suggestion for call admin (if its possible). When !calladmin in game is written. A menu pops up to select a player which you want to report, afterwards you pick a reason and then report comes on discord. It would help admins know for what exactly they are being called.

Best regards
The call admin sends the server name & IP along with the message so it shouldn't be much of a problem. Either way, if you want to send messages to different channels, just replace "call-admin" and "server-"(whatever it was, I forgot) in the .sp with your channel name of choosing and compile. They can all use the same bot.

However that said, currently there's a certain limitation when running more than one server on the same Bot. Discord has x-rate-limits (for example, getting guilds, 1 max every few seconds). While I implemented x-rate-limit support, it will only work fully if there's one server as my implementation of the x-rate-limit depends on each request to succeed. For example, If two servers launch at the same time and send guild list request at same time, one will succeed and the other won't. This is because server 2 was returned an error 429 instead of guilds list. I will implement support for this when I get time, possibly tomorrow. Until then, if you are running more than one server, try starting up the plugins at different time.

It's a good idea, for now I'm keeping it barebone as it's just meant to be an example. I will probably later on expand it and possibly add that though.
__________________

Last edited by Deathknife; 01-10-2017 at 13:04. Reason: Not anymore
Deathknife is offline