i dont even know what this PR is supposed to be about anymore, everyone lost the plot somewhere in the middle of act 2 #74
1 changed files with 4 additions and 4 deletions
Finishing touches.....
commit
32ba4d8385
|
|
@ -55,7 +55,7 @@ function convertNameAndTopic(channel, guild, customName) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const parentChannel = discord.channels.get(channel.parent_id)
|
const parentChannel = discord.channels.get(channel.parent_id)
|
||||||
let channelPrefix =
|
let channelPrefix =
|
||||||
( parentChannel?.type === DiscordTypes.ChannelType.GuildForum ? "[❓] "
|
( parentChannel?.type === DiscordTypes.ChannelType.GuildForum ? ""
|
||||||
: channel.type === DiscordTypes.ChannelType.PublicThread ? "[⛓️] "
|
: channel.type === DiscordTypes.ChannelType.PublicThread ? "[⛓️] "
|
||||||
: channel.type === DiscordTypes.ChannelType.AnnouncementThread ? "[⛓️] "
|
: channel.type === DiscordTypes.ChannelType.AnnouncementThread ? "[⛓️] "
|
||||||
: channel.type === DiscordTypes.ChannelType.PrivateThread ? "[🔒⛓️] "
|
: channel.type === DiscordTypes.ChannelType.PrivateThread ? "[🔒⛓️] "
|
||||||
|
|
@ -64,13 +64,13 @@ function convertNameAndTopic(channel, guild, customName) {
|
||||||
const chosenName = customName || (channelPrefix + channel.name);
|
const chosenName = customName || (channelPrefix + channel.name);
|
||||||
const maybeTopicWithPipe = channel.topic ? ` | ${channel.topic}` : '';
|
const maybeTopicWithPipe = channel.topic ? ` | ${channel.topic}` : '';
|
||||||
const maybeTopicWithNewlines = channel.topic ? `${channel.topic}\n\n` : '';
|
const maybeTopicWithNewlines = channel.topic ? `${channel.topic}\n\n` : '';
|
||||||
|
const maybeWithin = parentChannel ? `Within: ${parentChannel.name} (ID: ${parentChannel.id})\n` : '';
|
||||||
const channelIDPart = `Channel ID: ${channel.id}`;
|
const channelIDPart = `Channel ID: ${channel.id}`;
|
||||||
const guildIDPart = `Guild ID: ${guild.id}`;
|
const guildIDPart = `Guild ID: ${guild.id}`;
|
||||||
const maybeThreadWithinPart = parentChannel ? `Thread within: ${parentChannel.name} (ID: ${parentChannel.id})\n` : '';
|
|
||||||
|
|
||||||
const convertedTopic = customName
|
const convertedTopic = customName
|
||||||
? `#${channel.name}${maybeTopicWithPipe}\n\n${channelIDPart}\n${maybeThreadWithinPart}${guildIDPart}`
|
? `#${channel.name}${maybeTopicWithPipe}\n\n${maybeWithin}${channelIDPart}\n${guildIDPart}`
|
||||||
: `${maybeTopicWithNewlines}${channelIDPart}\n${maybeThreadWithinPart}${guildIDPart}`;
|
: `${maybeTopicWithNewlines}${maybeWithin}${channelIDPart}\n${guildIDPart}`;
|
||||||
|
|
||||||
return [chosenName, convertedTopic];
|
return [chosenName, convertedTopic];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue