Files
discord.js/packages/structures/src/channels/GroupDMChannel.ts
Jiralite 5e6bd4b3d7 build: Bump dependencies (#11333)
* 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>
2025-12-06 22:55:07 +00:00

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]);