From 39575951959cef6d3dd0b4497fc7f97e8a2aa6d4 Mon Sep 17 00:00:00 2001 From: dev-737 <73829355+dev-737@users.noreply.github.com> Date: Mon, 15 Jan 2024 08:01:01 +0530 Subject: [PATCH] refactor(links): change guide link to new domain --- README.md | 4 ++-- locales | 2 +- src/commands/slash/Information/credits.ts | 4 ++-- src/commands/slash/Information/help.ts | 4 ++-- src/commands/slash/Information/stats.ts | 3 +-- src/commands/slash/Main/hub/create.ts | 2 +- src/commands/slash/Main/hub/invite.ts | 3 ++- src/scripts/network/onboarding.ts | 2 +- src/utils/Constants.ts | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 173e4dd7..a8ef13c4 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ This repo contains the source code for the InterChat Discord bot. InterChat is a ## Prerequisites -1. [Node.js v18.16.1](https://nodejs.org/download/release/v18.16.1/) (or higher for non-Windows based systems) +1. [Node.js v18.**16**.0](https://nodejs.org/download/release/v18.16.0/) (or higher for non-Windows based systems) 2. [Git](https://git-scm.com/downloads) 3. [MongoDB](https://www.mongodb.com/try/download/community) 4. [NPM](https://www.npmjs.com/get-npm) or [Yarn](https://yarnpkg.com/getting-started/install) (we are using npm in this guide) 5. [An Imgur API Key](https://api.imgur.com/oauth2/addclient) (optional, for setting hub icon and banner) -6. [Python 3.9.13](https://www.python.org/downloads/release/python-2718/) & [Visual Studio Build Tools (Windows Only)](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) (for the API) +6. [Python 3.9.13](https://www.python.org/downloads/release/python-3913/) & [Visual Studio Build Tools (Windows Only)](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) (for the API) ## Running the code diff --git a/locales b/locales index f3c39432..fc960559 160000 --- a/locales +++ b/locales @@ -1 +1 @@ -Subproject commit f3c39432324292cdff937516c20710aa6e5787e5 +Subproject commit fc960559587a2667fe1513300bbdcf64036bdf23 diff --git a/src/commands/slash/Information/credits.ts b/src/commands/slash/Information/credits.ts index c35f3f95..e136fe76 100644 --- a/src/commands/slash/Information/credits.ts +++ b/src/commands/slash/Information/credits.ts @@ -57,7 +57,7 @@ export default class Credits extends BaseCommand { ${emojis.dotBlue} @${members[5]?.username} ${linksDivider} - [Guide](https://discord-interchat.github.io/docs) • [Invite](https://discord.com/application-directory/769921109209907241) • [Support Server](${LINKS.SUPPORT_INVITE}) • [Vote](https://top.gg/bot/769921109209907241/vote) • [Privacy](https://discord-interchat.github.io/docs/legal/privacy) • [Terms](https://discord-interchat.github.io/docs/legal/terms) + [Guide](${LINKS.DOCS}) • [Invite](https://discord.com/application-directory/769921109209907241) • [Support Server](${LINKS.SUPPORT_INVITE}) • [Vote](https://top.gg/bot/769921109209907241/vote) • [Privacy](${LINKS.DOCS}/legal/privacy) • [Terms](${LINKS.DOCS}/legal/terms) `); const linkButtons = new ActionRowBuilder().addComponents( @@ -70,7 +70,7 @@ export default class Credits extends BaseCommand { .setStyle(ButtonStyle.Link) .setLabel('Guide') .setEmoji(emojis.guide_icon) - .setURL('https://discord-interchat.github.io/docs'), + .setURL(LINKS.DOCS), new ButtonBuilder() .setStyle(ButtonStyle.Link) .setLabel('Support') diff --git a/src/commands/slash/Information/help.ts b/src/commands/slash/Information/help.ts index 51affbb7..75eb65b1 100644 --- a/src/commands/slash/Information/help.ts +++ b/src/commands/slash/Information/help.ts @@ -2,7 +2,7 @@ import { EmbedBuilder, ChatInputCommandInteraction } from 'discord.js'; import BaseCommand from '../../BaseCommand.js'; import { paginate } from '../../../utils/Pagination.js'; import { stripIndents } from 'common-tags'; -import { colors, emojis } from '../../../utils/Constants.js'; +import { LINKS, colors, emojis } from '../../../utils/Constants.js'; export default class Help extends BaseCommand { readonly data = { @@ -69,7 +69,7 @@ export default class Help extends BaseCommand { `); const page4 = EmbedBuilder.from(baseEmbed).setTitle('Final Notes').setDescription(stripIndents` - You\'re all set! You can now chat with people from other servers in real-time. For more detailed information and advanced features, refer to the official [InterChat online guide](https://discord-interchat.github.io/docs). Have fun! 🎉 + You\'re all set! You can now chat with people from other servers in real-time. For more detailed information and advanced features, refer to the official [InterChat online guide](${LINKS.DOCS}). Have fun! 🎉 For any questions, suggestions or feedback, join the [support server](https://discord.gg/2YkZAP2) or [vote for InterChat](https://top.gg/bot/769921109209907241/vote). `); diff --git a/src/commands/slash/Information/stats.ts b/src/commands/slash/Information/stats.ts index ae8760b1..902d8f58 100644 --- a/src/commands/slash/Information/stats.ts +++ b/src/commands/slash/Information/stats.ts @@ -34,7 +34,6 @@ export default class Stats extends BaseCommand { const guildCount = count.reduce((p, n) => p + n, 0); const uptime = msToReadable(interaction.client.uptime); - const docsLink = 'https://discord-interchat.github.io/docs'; const embed = new EmbedBuilder() .setColor(colors.interchatBlue) @@ -81,7 +80,7 @@ export default class Stats extends BaseCommand { .setLabel('Guide') .setStyle(ButtonStyle.Link) .setEmoji(emojis.docs_icon) - .setURL(docsLink), + .setURL(LINKS.DOCS), new ButtonBuilder() .setLabel('Support') .setStyle(ButtonStyle.Link) diff --git a/src/commands/slash/Main/hub/create.ts b/src/commands/slash/Main/hub/create.ts index ab2193ea..5a804c1b 100644 --- a/src/commands/slash/Main/hub/create.ts +++ b/src/commands/slash/Main/hub/create.ts @@ -147,7 +147,7 @@ export default class Create extends Hub { .setDescription( t( { phrase: 'hub.create.success', locale: interaction.user.locale }, - { name, support_invite: LINKS.SUPPORT_INVITE }, + { name, support_invite: LINKS.SUPPORT_INVITE, docs_link: LINKS.DOCS }, ), ) .setTimestamp(); diff --git a/src/commands/slash/Main/hub/invite.ts b/src/commands/slash/Main/hub/invite.ts index cc0dbb63..d8ce6c7e 100644 --- a/src/commands/slash/Main/hub/invite.ts +++ b/src/commands/slash/Main/hub/invite.ts @@ -1,7 +1,7 @@ import { ChatInputCommandInteraction, CacheType, EmbedBuilder } from 'discord.js'; import Hub from './index.js'; import { captureException } from '@sentry/node'; -import { emojis } from '../../../../utils/Constants.js'; +import { LINKS, emojis } from '../../../../utils/Constants.js'; import db from '../../../../utils/Db.js'; import Logger from '../../../../utils/Logger.js'; import { simpleEmbed } from '../../../../utils/Utils.js'; @@ -54,6 +54,7 @@ export default class Invite extends Hub { { phrase: 'hub.invite.create.success', locale: interaction.user.locale }, { inviteCode: createdInvite.code, + docs_link: LINKS.DOCS, expiry: ``, }, ), diff --git a/src/scripts/network/onboarding.ts b/src/scripts/network/onboarding.ts index 7eec004a..4114633e 100644 --- a/src/scripts/network/onboarding.ts +++ b/src/scripts/network/onboarding.ts @@ -44,7 +44,7 @@ export async function showOnboarding( .setDescription( t( { phrase: 'network.onboarding.embed.description', locale: interaction.user.locale }, - { hubName }, + { hubName, docs_link: LINKS.DOCS }, ), ) .setColor(colors.interchatBlue) diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index f754599e..8a83727c 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -43,7 +43,7 @@ export const SupporterIds = ['880978672037802014']; export const LINKS = { TOPGG_API: 'https://top.gg/api/bots/769921109209907241', VOTE: 'https://top.gg/bot/769921109209907241/vote', - DOCS: 'https://discord-interchat.github.io/docs', + DOCS: 'https://docs.interchat.fun', SUPPORT_INVITE: 'https://discord.gg/6bhXQynAPs', APP_DIRECTORY: 'https://discord.com/application-directory/769921109209907241', RULES_BANNER: 'https://i.imgur.com/MBG0Rks.png',