mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-01 16:40:07 +00:00
* build: bump dependencies * fix: guide build * build: amend package.json.hbs * build: create-discord-bot * style: formatting * build: final change --------- Co-authored-by: almeidx <github@almeidx.dev>
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import type { APIGroupDMChannel, ChannelType } from 'discord-api-types/v10';
|
|
import { Mixin } from '../Mixin.js';
|
|
import type { MixinTypes } from '../MixinTypes.d.ts';
|
|
import type { Partialize } from '../utils/types.js';
|
|
import { Channel } from './Channel.js';
|
|
import { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';
|
|
import { DMChannelMixin } from './mixins/DMChannelMixin.js';
|
|
import { GroupDMMixin } from './mixins/GroupDMMixin.js';
|
|
import { TextChannelMixin } from './mixins/TextChannelMixin.js';
|
|
|
|
export interface GroupDMChannel<Omitted extends keyof APIGroupDMChannel | '' = ''> extends MixinTypes<
|
|
Channel<ChannelType.GroupDM>,
|
|
[
|
|
DMChannelMixin<ChannelType.GroupDM>,
|
|
TextChannelMixin<ChannelType.GroupDM>,
|
|
ChannelOwnerMixin<ChannelType.GroupDM>,
|
|
GroupDMMixin,
|
|
]
|
|
> {}
|
|
|
|
/**
|
|
* Sample Implementation of a structure for group dm channels, usable by direct end consumers.
|
|
*/
|
|
export class GroupDMChannel<Omitted extends keyof APIGroupDMChannel | '' = ''> extends Channel<
|
|
ChannelType.GroupDM,
|
|
Omitted
|
|
> {
|
|
public constructor(data: Partialize<APIGroupDMChannel, Omitted>) {
|
|
super(data);
|
|
this.optimizeData(data);
|
|
}
|
|
}
|
|
|
|
Mixin(GroupDMChannel, [DMChannelMixin, TextChannelMixin, ChannelOwnerMixin, GroupDMMixin]);
|