discordapp.com -> discord.com
This commit is contained in:
parent
4cf8c2ae92
commit
b251942e40
3 changed files with 7 additions and 7 deletions
|
@ -22,7 +22,7 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
const DISCORD_API_URL = "https://discordapp.com/api";
|
||||
const DISCORD_API_URL = "https://discord.com/api";
|
||||
|
||||
function simpleDiscordAPIRequest(bearerToken, path): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -94,8 +94,8 @@ export function initAuth(app: express.Express) {
|
|||
passport.use(
|
||||
new OAuth2Strategy(
|
||||
{
|
||||
authorizationURL: "https://discordapp.com/api/oauth2/authorize",
|
||||
tokenURL: "https://discordapp.com/api/oauth2/token",
|
||||
authorizationURL: "https://discord.com/api/oauth2/authorize",
|
||||
tokenURL: "https://discord.com/api/oauth2/token",
|
||||
clientID: process.env.CLIENT_ID,
|
||||
clientSecret: process.env.CLIENT_SECRET,
|
||||
callbackURL: process.env.OAUTH_CALLBACK_URL,
|
||||
|
|
|
@ -136,7 +136,7 @@ export class RemindersPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
const reminderBody = args.reminder || `https://discordapp.com/channels/${this.guildId}/${msg.channel.id}/${msg.id}`;
|
||||
const reminderBody = args.reminder || `https://discord.com/channels/${this.guildId}/${msg.channel.id}/${msg.id}`;
|
||||
await this.reminders.add(
|
||||
msg.author.id,
|
||||
msg.channel.id,
|
||||
|
|
|
@ -423,7 +423,7 @@ export function getUrlsInString(str: string, unique = false): MatchedURL[] {
|
|||
}
|
||||
|
||||
export function getInviteCodesInString(str: string): string[] {
|
||||
const inviteCodeRegex = /(?:discord.gg|discordapp.com\/invite)\/([a-z0-9]+)/gi;
|
||||
const inviteCodeRegex = /(?:discord.gg|discordapp.com\/invite|discord.com\/invite)\/([a-z0-9]+)/gi;
|
||||
return Array.from(str.matchAll(inviteCodeRegex)).map(m => m[1]);
|
||||
}
|
||||
|
||||
|
@ -559,7 +559,7 @@ export function disableCodeBlocks(content: string): string {
|
|||
}
|
||||
|
||||
export function useMediaUrls(content: string): string {
|
||||
return content.replace(/cdn\.discordapp\.com/g, "media.discordapp.net");
|
||||
return content.replace(/cdn\.discord(app)?\.com/g, "media.discordapp.net");
|
||||
}
|
||||
|
||||
export function chunkArray<T>(arr: T[], chunkSize): T[][] {
|
||||
|
@ -1071,7 +1071,7 @@ export function messageLink(guildIdOrMessage: string | Message | null, channelId
|
|||
guildId = guildIdOrMessage;
|
||||
}
|
||||
|
||||
return `https://discordapp.com/channels/${guildId}/${channelId}/${messageId}`;
|
||||
return `https://discord.com/channels/${guildId}/${channelId}/${messageId}`;
|
||||
}
|
||||
|
||||
export function isValidEmbed(embed: any): boolean {
|
||||
|
|
Loading…
Add table
Reference in a new issue