seyfert/packages/biscuit/structures/WelcomeChannel.ts
Yuzu b15666f20e
chore: use single quotes (#68)
* chore: single quote
2022-07-18 18:25:23 +00:00

34 lines
1.0 KiB
TypeScript

import type { Model } from './Base.ts';
import type { Snowflake } from '../Snowflake.ts';
import type { Session } from '../Session.ts';
import type { DiscordWelcomeScreenChannel } from '../../discordeno/mod.ts';
import Emoji from './Emoji.ts';
/**
* Not a channel
* @link https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-channel-structure
*/
export class WelcomeChannel implements Model {
constructor(session: Session, data: DiscordWelcomeScreenChannel) {
this.session = session;
this.channelId = data.channel_id;
this.description = data.description;
this.emoji = new Emoji(session, {
name: data.emoji_name ? data.emoji_name : undefined,
id: data.emoji_id ? data.emoji_id : undefined,
});
}
session: Session;
channelId: Snowflake;
description: string;
emoji: Emoji;
/** alias for WelcomeScreenChannel.channelId */
get id(): Snowflake {
return this.channelId;
}
}
export default WelcomeChannel;