3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

discordapp.com -> discord.com

This commit is contained in:
Dragory 2020-05-04 21:56:15 +03:00
parent 4cf8c2ae92
commit b251942e40
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
3 changed files with 7 additions and 7 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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 {