diff --git a/controller/channel.ts b/controller/channel.ts new file mode 100644 index 0000000..04674e5 --- /dev/null +++ b/controller/channel.ts @@ -0,0 +1,13 @@ +import {Channel} from "../models/Channel"; + +/** + * Lists all global channels in a guild + * @param guildId The id of the guild + */ +export const listChannels = async (guildId: string) => Channel.findAll({where: {guildId: guildId}}); + +/** + * Gets a global channel by its id + * @param channelId The id of the channel + */ +export const getChannelById = async (channelId: string) => Channel.findOne({where: {channelId: channelId}}); \ No newline at end of file