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); | ||||
| }); | ||||
|  | @ -39,16 +39,16 @@ const getChannelByType = ( | |||
|   | undefined => { | ||||
|   switch (data.type) { | ||||
|     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) | ||||
|     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) | ||||
|     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) | ||||
|     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) | ||||
|     case ChannelTypes.DM: | ||||
|       return new DMChannel(client, data as DMChannelPayload) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue