Created the channel.ts
This commit is contained in:
parent
174dcc9223
commit
c62594a59b
13
controller/channel.ts
Normal file
13
controller/channel.ts
Normal file
@ -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}});
|
Loading…
x
Reference in New Issue
Block a user