Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord Integration Custom channels #94

Open
thmsndk opened this issue Jan 18, 2024 · 3 comments · May be fixed by #116
Open

Discord Integration Custom channels #94

thmsndk opened this issue Jan 18, 2024 · 3 comments · May be fixed by #116

Comments

@thmsndk
Copy link
Contributor

thmsndk commented Jan 18, 2024

Currently you can configure your bot token in variables.js but the webhooks / channels it goes to are hardcoded to the adventureland discord.

general messages seems to go to #game_events and if the message contains joined Adventure Land it will go to #new_players

At the very minimum you should be able to specify the general events channel, and the new player channel in variables.js or something equivalent.

function discord_call(message) {
if (gameplay == "hardcore" || gameplay == "test") {
return;
}
if (is_sdk) {
return server_log("Discord: " + message);
}
var url = "https://discordapp.com/api/channels/404333059018719233/messages";
if (message.search(" joined Adventure Land") != -1) {
url = "https://discordapp.com/api/channels/839163123499794481/messages";
}
request(
{
url: url,
headers: { Authorization: "Bot " + variables.discord_token },
method: "POST",
json: {
content: message,
},
},
function (err, response, body) {
//console.log(response);
},
);
}

@ATLUSio
Copy link
Contributor

ATLUSio commented Feb 22, 2024

The IDs in 3270 and 3272 are likely specific to the adventure.land discord, no?

@FreezePhoenix
Copy link
Contributor

Yes! Those could probably be changed.

@FreezePhoenix
Copy link
Contributor

404333059018719233 corresponds to #game_events, while 839163123499794481 corresponds to #new_players

@thmsndk thmsndk linked a pull request Feb 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants