Adds ICS
This commit is contained in:
parent
441715675c
commit
a79898b2e9
48 changed files with 2062 additions and 1503 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import {
|
||||
SlashCommandBuilder,
|
||||
ChatInputCommandInteraction,
|
||||
MessageFlags,
|
||||
InteractionReplyOptions,
|
||||
GuildMember,
|
||||
EmbedBuilder,
|
||||
AutocompleteInteraction,
|
||||
roleMention, time, userMention, GuildMemberRoleManager
|
||||
MessageFlags,
|
||||
InteractionReplyOptions,
|
||||
GuildMember,
|
||||
EmbedBuilder,
|
||||
AutocompleteInteraction,
|
||||
roleMention, time, userMention, GuildMemberRoleManager
|
||||
} from "discord.js";
|
||||
import {AutocompleteCommand, ChatInteractionCommand, Command} from "./Command";
|
||||
import {GroupModel} from "../../Models/GroupModel";
|
||||
|
|
@ -142,10 +142,10 @@ export class GroupCommand implements Command, ChatInteractionCommand, Autocomple
|
|||
|
||||
Container.get<GroupRepository>(GroupRepository.name).create(group);
|
||||
|
||||
interaction.reply({content: `:white_check_mark: Created group \`${name}\``, flags: MessageFlags.Ephemeral })
|
||||
interaction.reply({content: `:white_check_mark: Created group \`${name}\``, flags: MessageFlags.Ephemeral})
|
||||
}
|
||||
|
||||
private validateGroupName(name: string): true|string{
|
||||
private validateGroupName(name: string): true | string {
|
||||
const lowercaseName = name.toLowerCase();
|
||||
for (const invalidcharactersequence of GroupCommand.INVALID_CHARACTER_SEQUENCES) {
|
||||
if (!lowercaseName.includes(invalidcharactersequence)) {
|
||||
|
|
@ -162,7 +162,7 @@ export class GroupCommand implements Command, ChatInteractionCommand, Autocomple
|
|||
const groups = repo.findGroupsByMember(<GuildMember>interaction.member);
|
||||
|
||||
const playdateRepo = Container.get<PlaydateRepository>(PlaydateRepository.name);
|
||||
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle("Your groups on this server:")
|
||||
.setFields(
|
||||
|
|
@ -191,7 +191,7 @@ export class GroupCommand implements Command, ChatInteractionCommand, Autocomple
|
|||
embeds: [
|
||||
embed
|
||||
],
|
||||
allowedMentions: { roles: [] },
|
||||
allowedMentions: {roles: []},
|
||||
flags: MessageFlags.Ephemeral
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue