Fix lint
This commit is contained in:
		
							parent
							
								
									3a3af635c6
								
							
						
					
					
						commit
						7ead2c2ea6
					
				
					 7 changed files with 15 additions and 15 deletions
				
			
		|  | @ -13,7 +13,7 @@ export const channelUpdate: GatewayEventHandler = async ( | |||
|   if (oldChannel !== undefined) { | ||||
|     await gateway.client.channels.set(d.id, d) | ||||
|     let guild: undefined | Guild; | ||||
|     if('guild_id' in d) { | ||||
|     if ('guild_id' in d) { | ||||
|       // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
 | ||||
|       guild = await gateway.client.guilds.get((d as GuildChannelPayload).guild_id) as Guild | undefined | ||||
|     } | ||||
|  |  | |||
|  | @ -17,7 +17,7 @@ export const messageCreate: GatewayEventHandler = async ( | |||
|   const user = new User(gateway.client, d.author) | ||||
|   await gateway.client.users.set(d.author.id, d.author) | ||||
|   let guild | ||||
|   if(d.guild_id !== undefined) { | ||||
|   if (d.guild_id !== undefined) { | ||||
|     guild = await gateway.client.guilds.get(d.guild_id) | ||||
|   } | ||||
|   const mentions = new MessageMentions() | ||||
|  |  | |||
|  | @ -232,7 +232,7 @@ class Gateway { | |||
|       } | ||||
|     } | ||||
| 
 | ||||
|     if(this.client.bot === false) { | ||||
|     if (this.client.bot === false) { | ||||
|       // TODO: Complete Selfbot support
 | ||||
|       this.debug("Modify Identify Payload for Self-bot..") | ||||
|       // delete payload.d['intents']
 | ||||
|  |  | |||
|  | @ -182,7 +182,7 @@ export class RESTManager { | |||
|       method: method.toUpperCase() | ||||
|     } | ||||
| 
 | ||||
|     if(this.client.bot === false) { | ||||
|     if (this.client.bot === false) { | ||||
|       // This is a selfbot. Use requests similar to Discord Client
 | ||||
|       data.headers['authorization'] = this.client.token as string | ||||
|       data.headers['accept-language'] = 'en-US' | ||||
|  | @ -252,7 +252,7 @@ export class RESTManager { | |||
|           let urlToUse = | ||||
|             method === 'get' && query !== '' ? `${url}?${query}` : url | ||||
| 
 | ||||
|           if(this.client.canary) { | ||||
|           if (this.client.canary) { | ||||
|             let split = urlToUse.split('//') | ||||
|             urlToUse = split[0] + '//canary.' + split[1] | ||||
|           } | ||||
|  | @ -328,7 +328,7 @@ export class RESTManager { | |||
|     // eslint-disable-next-line @typescript-eslint/no-floating-promises
 | ||||
|     this.logErrors(response, errorStack) | ||||
| 
 | ||||
|     if(status === HttpResponseCode.Unauthorized) throw new Error("Request was not successful. Invalid Token.") | ||||
|     if (status === HttpResponseCode.Unauthorized) throw new Error("Request was not successful. Invalid Token.") | ||||
| 
 | ||||
|     switch (status) { | ||||
|       case HttpResponseCode.BadRequest: | ||||
|  |  | |||
|  | @ -88,7 +88,7 @@ export class Message extends Base { | |||
|     this.flags = data.flags | ||||
|     this.channel = channel | ||||
|     // TODO: Cache in Gateway Event Code
 | ||||
|     // if(!noSave) this.client.messages.set(this.id, data)
 | ||||
|     // if (!noSave) this.client.messages.set(this.id, data)
 | ||||
|   } | ||||
| 
 | ||||
|   protected readFromData (data: MessagePayload): void { | ||||
|  |  | |||
|  | @ -14,8 +14,8 @@ export const getBuildInfo = (client: Client) => { | |||
|     let browser_version = '83.0' | ||||
|     let browser_user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 ' + browser + '/' + browser_version | ||||
|     // TODO: Use current OS properties, but also browser_user_agent accordingly
 | ||||
|     // if(Deno.build.os === 'darwin') os = 'MacOS'
 | ||||
|     // else if(Deno.build.os === 'linux') os = 'Ubuntu'
 | ||||
|     // if (Deno.build.os === 'darwin') os = 'MacOS'
 | ||||
|     // else if (Deno.build.os === 'linux') os = 'Ubuntu'
 | ||||
| 
 | ||||
|     return { | ||||
|         os, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue