small fixes

pull/17/head
PineaFan 3 years ago
parent c4d6c3fee0
commit 19dc9b8066
No known key found for this signature in database
GPG Key ID: D404018735F488C9

@ -16,7 +16,7 @@ const defaultDict: Record<string, string | string[] | boolean> = {
verifySecret:
"If using verify, enter a code here which matches the secret sent back by your website. You can use a random code if you do not have one already. (Optional)",
mongoUrl: "Your Mongo connection string, e.g. mongodb://127.0.0.1:27017",
baseUrl: "Your website where buttons such as Verify and Role menu will link to, e.g. https://example.com",
baseUrl: "Your website where buttons such as Verify and Role menu will link to, e.g. https://example.com/",
pastebinApiKey: "An API key for pastebin (optional)",
pastebinUsername: "Your pastebin username (optional)",
pastebinPassword: "Your pastebin password (optional)",

@ -5,6 +5,8 @@ import humanizeDuration from "humanize-duration";
import type { NucleusClient } from "../utils/client.js";
import getEmojiByName from "../utils/getEmojiByName.js";
import c from "../utils/client.js";
import { capitalize } from "../utils/generateKeyValueList.js";
let entry = c.logger.entry;
const channelTypeEmoji: Record<number, string> = {
@ -137,8 +139,8 @@ export async function callback(client: NucleusClient, oldChannel: GuildChannel,
);
if ((oldChannel as VoiceChannel).rtcRegion !== (newChannel as VoiceChannel).rtcRegion)
changes.region = entry(
[(oldChannel as VoiceChannel).rtcRegion ?? "Automatic", (newChannel as VoiceChannel).rtcRegion ?? "Automatic"],
`${(oldChannel as VoiceChannel).rtcRegion?.toUpperCase() ?? "Automatic"} -> ${(newChannel as VoiceChannel).rtcRegion?.toUpperCase() ?? "Automatic"}`
[(oldChannel as VoiceChannel).rtcRegion ?? "automatic", (newChannel as VoiceChannel).rtcRegion ?? "automatic"],
`${capitalize((oldChannel as VoiceChannel).rtcRegion?.toUpperCase() ?? "automatic")} -> ${capitalize((newChannel as VoiceChannel).rtcRegion?.toUpperCase() ?? "automatic")}`
);
break;
}
@ -209,4 +211,3 @@ export async function callback(client: NucleusClient, oldChannel: GuildChannel,
};
log(data);
}
//TODO: Capitialize RTC Regions
Loading…
Cancel
Save