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

Raised New PR : (https://github.com/Real-Dev-Squad/discord-slash-commands/pull/98) Added description to the message after using /verify #85 #90

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
2 changes: 2 additions & 0 deletions src/constants/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ export const ROLE_ADDED = "Role added successfully";

export const NAME_CHANGED = "User nickname changed successfully";

export const VERIFICATION_STRING =
"Like to verify yourself? click the above link and authorize real dev squad to manage your discord data";
export const ROLE_REMOVED = "Role Removed successfully";
6 changes: 3 additions & 3 deletions src/controllers/verifyCommand.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import config from "../../config/config";
import { RETRY_COMMAND } from "../constants/responses";
import { RETRY_COMMAND, VERIFICATION_STRING } from "../constants/responses";
import { env } from "../typeDefinitions/default.types";
import { discordEphemeralResponse } from "../utils/discordEphemeralResponse";
import { generateUniqueToken } from "../utils/generateUniqueToken";
Expand All @@ -13,7 +13,6 @@ export async function verifyCommand(
env: env
) {
const token = await generateUniqueToken();

const response = await sendUserDiscordData(
token,
userId,
Expand All @@ -24,7 +23,8 @@ export async function verifyCommand(
);
if (response?.status === 201 || response?.status === 200) {
const verificationSiteURL = config(env).VERIFICATION_SITE_URL;
const message = `${verificationSiteURL}/discord?token=${token}`;
const message =
`${verificationSiteURL}/discord?token=${token}\n` + VERIFICATION_STRING;
shreya-mishra marked this conversation as resolved.
Show resolved Hide resolved
return discordEphemeralResponse(message);
} else {
return discordEphemeralResponse(RETRY_COMMAND);
Expand Down