13 lines
425 B
TypeScript
13 lines
425 B
TypeScript
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}}); |