mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
Add Guild.fetchChannel method
This commit is contained in:
parent
1b814cebdf
commit
2a0186d16c
@ -16,6 +16,7 @@ import {
|
|||||||
DiscordOverwrite,
|
DiscordOverwrite,
|
||||||
DiscordRole,
|
DiscordRole,
|
||||||
DiscordVoiceRegion,
|
DiscordVoiceRegion,
|
||||||
|
DiscordChannel,
|
||||||
ExplicitContentFilterLevels,
|
ExplicitContentFilterLevels,
|
||||||
GuildNsfwLevel,
|
GuildNsfwLevel,
|
||||||
MakeRequired,
|
MakeRequired,
|
||||||
@ -52,8 +53,9 @@ import {
|
|||||||
GUILD_VANITY,
|
GUILD_VANITY,
|
||||||
GUILD_WIDGET,
|
GUILD_WIDGET,
|
||||||
USER_GUILDS,
|
USER_GUILDS,
|
||||||
|
CHANNEL,
|
||||||
} from '@biscuitland/api-types';
|
} from '@biscuitland/api-types';
|
||||||
import { GuildChannel, ReturnThreadsArchive, ThreadChannel } from './channels';
|
import { ChannelFactory, GuildChannel, ReturnThreadsArchive, ThreadChannel, Channel } from './channels';
|
||||||
import { Member, ThreadMember } from './members';
|
import { Member, ThreadMember } from './members';
|
||||||
import { Role } from './role';
|
import { Role } from './role';
|
||||||
import { GuildEmoji } from './emojis';
|
import { GuildEmoji } from './emojis';
|
||||||
@ -1210,4 +1212,10 @@ export class Guild extends BaseGuild implements Model {
|
|||||||
|
|
||||||
return new GuildPreview(this.session, preview);
|
return new GuildPreview(this.session, preview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fetchChannel(channelID: string): Promise<Channel> {
|
||||||
|
const channel = await this.session.rest.get<DiscordChannel>(CHANNEL(channelID));
|
||||||
|
|
||||||
|
return ChannelFactory.from(this.session, channel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user