mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Update Discord URL to the new one (#52299)
Replace `discordapp.com` with `discord.com`.
This commit is contained in:
@@ -137,7 +137,7 @@ SUBSYSTEM_DEF(discord)
|
||||
if(!CONFIG_GET(flag/enable_discord_autorole))
|
||||
return
|
||||
|
||||
var/url = "https://discordapp.com/api/guilds/[CONFIG_GET(string/discord_guildid)]/members/[id]/roles/[CONFIG_GET(string/discord_roleid)]"
|
||||
var/url = "https://discord.com/api/guilds/[CONFIG_GET(string/discord_guildid)]/members/[id]/roles/[CONFIG_GET(string/discord_roleid)]"
|
||||
|
||||
// Make the request
|
||||
var/datum/http_request/req = new()
|
||||
|
||||
+1
-1
@@ -496,7 +496,7 @@ DEFAULT_VIEW_SQUARE 15x15
|
||||
|
||||
#### DISCORD STUFFS ####
|
||||
## MAKE SURE ALL SECTIONS OF THIS ARE FILLED OUT BEFORE ENABLING
|
||||
## Discord IDs can be obtained by following this guide: https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-
|
||||
## Discord IDs can be obtained by following this guide: https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-
|
||||
|
||||
## Uncomment to enable discord auto-roling when users link their BYOND and Discord accounts
|
||||
#ENABLE_DISCORD_AUTOROLE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
//This file contains things that should not be touched by the automatic live tracker
|
||||
|
||||
|
||||
//Github lets you have it sign the message with a secret that you can validate. This prevents people from faking events.
|
||||
//This var should match the secret you configured for this webhook on github.
|
||||
//This is required as otherwise somebody could trick the script into leaking the api key.
|
||||
@@ -67,7 +67,7 @@ announce_secret - Announce secret/security prs that have a [s] in front of the t
|
||||
$servers[$configitem]['announce_secret'] = false;
|
||||
$servers[$configitem]['announce_secret'] = 'only';
|
||||
|
||||
announce_unvalidated - Announce prs by unvalidated users (see the validation setting above)? Defaults to no.
|
||||
announce_unvalidated - Announce prs by unvalidated users (see the validation setting above)? Defaults to no.
|
||||
Can also be set to 'only' to only announce prs by unvalidated users.
|
||||
$servers[$configitem]['announce_unvalidated'] = false;
|
||||
|
||||
@@ -104,7 +104,7 @@ $configitem = -1;//ignore me
|
||||
$discordWebHooks[++$configitem] = array();
|
||||
|
||||
// Webhook Url (you can get this from discord via the webhook setting menu of the server or a channel.)
|
||||
$discordWebHooks[$configitem]['url'] = 'https://discordapp.com/api/webhooks/538933489920245771/xaoYtVuype-P1rb_uthQLkh_C4iVL3sjtIvFEp7rsfhbBs8tDsSJgE0a9MNWJaoSPBPK';
|
||||
$discordWebHooks[$configitem]['url'] = 'https://discord.com/api/webhooks/538933489920245771/xaoYtVuype-P1rb_uthQLkh_C4iVL3sjtIvFEp7rsfhbBs8tDsSJgE0a9MNWJaoSPBPK';
|
||||
|
||||
// show an embed with more info?
|
||||
$discordWebHooks[$configitem]['embed'] = true;
|
||||
@@ -118,7 +118,7 @@ $discordWebHooks[$configitem]['no_text'] = false;
|
||||
$discordWebHooks[++$configitem] = array();
|
||||
|
||||
// Webhook Url (you can get this from discord via the webhook setting menu of the server or a channel.)
|
||||
$discordWebHooks[$configitem]['url'] = 'https://discordapp.com/api/webhooks/538933686956064769/q0uDel7S6eutvRIyEwsuZo_ppzAoxqUNeU2PRChYVsYoJmmn2f2YYSDoMjy9FhhXKqpI';
|
||||
$discordWebHooks[$configitem]['url'] = 'https://discord.com/api/webhooks/538933686956064769/q0uDel7S6eutvRIyEwsuZo_ppzAoxqUNeU2PRChYVsYoJmmn2f2YYSDoMjy9FhhXKqpI';
|
||||
|
||||
// show an embed with more info?
|
||||
$discordWebHooks[$configitem]['embed'] = true;
|
||||
|
||||
@@ -48,7 +48,7 @@ for user in usersToProcess:
|
||||
count += 1 # Why the fuck does python not have ++
|
||||
# user[0] = ckey, user[1] = discord ID
|
||||
print("Processing "+str(user[0])+" (Discord ID: " + str(user[1]) + ") | User "+str(count)+"/"+str(total))
|
||||
url = "https://discordapp.com/api/guilds/"+str(guildID)+"/members/"+str(user[1])+"/roles/"+str(roleID)
|
||||
url = "https://discord.com/api/guilds/"+str(guildID)+"/members/"+str(user[1])+"/roles/"+str(roleID)
|
||||
response = requests.put(url, headers={"Authorization": "Bot "+str(botToken)})
|
||||
# Adding a role returns a code 204, not a code 200. Dont ask
|
||||
if response.status_code != 204:
|
||||
|
||||
Reference in New Issue
Block a user