Merge pull request #1 from AkiaCode/main
Fix lint & Added reconnect handler
This commit is contained in:
		
						commit
						a40ce553ed
					
				
					 19 changed files with 52 additions and 45 deletions
				
			
		|  | @ -4,13 +4,13 @@ | |||
| 
 | ||||
| [](https://github.com/RichardLitt/standard-readme) | ||||
| 
 | ||||
| An easy to use Discord API Library for Deno | ||||
| **An easy to use Discord API Library for Deno** | ||||
| 
 | ||||
| ## Table of Contents | ||||
| 
 | ||||
| - [Usage](#usage) | ||||
| - [Docs](#docs) | ||||
| - [Maintainers](#maintainers) | ||||
| - [Maintainer](#maintainer) | ||||
| - [Contributing](#contributing) | ||||
| - [License](#license) | ||||
| 
 | ||||
|  | @ -35,7 +35,7 @@ bot.connect(TOKEN, [GatewayIntents.GUILD_MESSAGES]) | |||
| 
 | ||||
| Not made yet | ||||
| 
 | ||||
| ## Maintainers | ||||
| ## Maintainer | ||||
| 
 | ||||
| [@Helloyunho](https://github.com/Helloyunho) | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,12 +12,13 @@ import { ready } from './ready.ts' | |||
| import { guildBanRemove } from './guildBanRemove.ts' | ||||
| import { messageCreate } from "./messageCreate.ts" | ||||
| import { resume } from "./resume.ts" | ||||
| import { reconnect } from './reconnect.ts' | ||||
| 
 | ||||
| export const gatewayHandlers: { | ||||
|   [eventCode in GatewayEvents]: GatewayEventHandler | undefined | ||||
| } = { | ||||
|   READY: ready, | ||||
|   RECONNECT: undefined, | ||||
|   RECONNECT: reconnect, | ||||
|   RESUMED: resume, | ||||
|   CHANNEL_CREATE: channelCreate, | ||||
|   CHANNEL_DELETE: channelDelete, | ||||
|  |  | |||
							
								
								
									
										6
									
								
								src/gateway/handlers/reconnect.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/gateway/handlers/reconnect.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| import { Gateway } from "../index.ts" | ||||
| import { GatewayEventHandler } from "../index.ts" | ||||
| 
 | ||||
| export const reconnect: GatewayEventHandler = async (gateway: Gateway, d: any) => { | ||||
|     gateway.reconnect() | ||||
| } | ||||
|  | @ -227,7 +227,7 @@ class Gateway { | |||
|         token: this.token, | ||||
|         properties: { | ||||
|           $os: Deno.build.os, | ||||
|           $browser: 'discord.deno', | ||||
|           $browser: 'discord.deno', //TODO: Change lib name
 | ||||
|           $device: 'discord.deno' | ||||
|         }, | ||||
|         compress: true, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue