More lint error fixes (completed hopefully)
This commit is contained in:
parent
686d6ed1fe
commit
30d0e8a571
2 changed files with 5 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
||||||
export const delay = (ms: number) => new Promise((resolve, reject) => {
|
export const delay = async (ms: number): Promise<true> => await new Promise((resolve, reject) => {
|
||||||
setTimeout(() => resolve(true), ms);
|
setTimeout(() => resolve(true), ms);
|
||||||
});
|
});
|
|
@ -39,16 +39,16 @@ const getChannelByType = (
|
||||||
| undefined => {
|
| undefined => {
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case ChannelTypes.GUILD_CATEGORY:
|
case ChannelTypes.GUILD_CATEGORY:
|
||||||
if(!guild) throw new Error("No Guild was provided to construct Channel")
|
if(guild === undefined) throw new Error("No Guild was provided to construct Channel")
|
||||||
return new CategoryChannel(client, data as GuildChannelCategoryPayload, guild)
|
return new CategoryChannel(client, data as GuildChannelCategoryPayload, guild)
|
||||||
case ChannelTypes.GUILD_NEWS:
|
case ChannelTypes.GUILD_NEWS:
|
||||||
if(!guild) throw new Error("No Guild was provided to construct Channel")
|
if(guild === undefined) throw new Error("No Guild was provided to construct Channel")
|
||||||
return new NewsChannel(client, data as GuildNewsChannelPayload, guild)
|
return new NewsChannel(client, data as GuildNewsChannelPayload, guild)
|
||||||
case ChannelTypes.GUILD_TEXT:
|
case ChannelTypes.GUILD_TEXT:
|
||||||
if(!guild) throw new Error("No Guild was provided to construct Channel")
|
if(guild === undefined) throw new Error("No Guild was provided to construct Channel")
|
||||||
return new GuildTextChannel(client, data as GuildTextChannelPayload, guild)
|
return new GuildTextChannel(client, data as GuildTextChannelPayload, guild)
|
||||||
case ChannelTypes.GUILD_VOICE:
|
case ChannelTypes.GUILD_VOICE:
|
||||||
if(!guild) throw new Error("No Guild was provided to construct Channel")
|
if(guild === undefined) throw new Error("No Guild was provided to construct Channel")
|
||||||
return new VoiceChannel(client, data as GuildVoiceChannelPayload, guild)
|
return new VoiceChannel(client, data as GuildVoiceChannelPayload, guild)
|
||||||
case ChannelTypes.DM:
|
case ChannelTypes.DM:
|
||||||
return new DMChannel(client, data as DMChannelPayload)
|
return new DMChannel(client, data as DMChannelPayload)
|
||||||
|
|
Loading…
Reference in a new issue