fix errors (github resolve editor sucks)
This commit is contained in:
		
							parent
							
								
									06997a1c18
								
							
						
					
					
						commit
						dc1e2bbc6e
					
				
					 4 changed files with 7 additions and 5 deletions
				
			
		|  | @ -92,7 +92,7 @@ export class GuildChannelsManager extends BaseChildManager< | ||||||
| 
 | 
 | ||||||
|   /** Modify the positions of a set of channel positions for the guild. */ |   /** Modify the positions of a set of channel positions for the guild. */ | ||||||
|   async editPositions( |   async editPositions( | ||||||
|     ...positions: Array<{ id: string | GuildChannel; position: number | null }> |     ...positions: Array<{ id: string | GuildChannels; position: number | null }> | ||||||
|   ): Promise<GuildChannelsManager> { |   ): Promise<GuildChannelsManager> { | ||||||
|     if (positions.length === 0) |     if (positions.length === 0) | ||||||
|       throw new Error('No channel positions to change specified') |       throw new Error('No channel positions to change specified') | ||||||
|  |  | ||||||
|  | @ -18,7 +18,6 @@ import { | ||||||
| } from '../types/guild.ts' | } from '../types/guild.ts' | ||||||
| import { BaseManager } from './base.ts' | import { BaseManager } from './base.ts' | ||||||
| import { MembersManager } from './members.ts' | import { MembersManager } from './members.ts' | ||||||
| import { fetchAuto } from '../../deps.ts' |  | ||||||
| import { Emoji } from '../structures/emoji.ts' | import { Emoji } from '../structures/emoji.ts' | ||||||
| 
 | 
 | ||||||
| export class GuildManager extends BaseManager<GuildPayload, Guild> { | export class GuildManager extends BaseManager<GuildPayload, Guild> { | ||||||
|  | @ -60,6 +59,7 @@ export class GuildManager extends BaseManager<GuildPayload, Guild> { | ||||||
|       typeof template === 'object' ? template.code : template |       typeof template === 'object' ? template.code : template | ||||||
|     ].post({ name, icon }) |     ].post({ name, icon }) | ||||||
|     return new Guild(this.client, guild) |     return new Guild(this.client, guild) | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   /** |   /** | ||||||
|    * Creates a guild. Returns Guild. Fires guildCreate event. |    * Creates a guild. Returns Guild. Fires guildCreate event. | ||||||
|  |  | ||||||
|  | @ -386,7 +386,7 @@ export class Guild extends Base { | ||||||
|   /** Modify a guild widget object for the guild. */ |   /** Modify a guild widget object for the guild. */ | ||||||
|   async editWidget(data: { |   async editWidget(data: { | ||||||
|     enabled?: boolean |     enabled?: boolean | ||||||
|     channel?: string | GuildChannel |     channel?: string | GuildChannels | ||||||
|   }): Promise<Guild> { |   }): Promise<Guild> { | ||||||
|     await this.client.rest.api.guilds[this.id].widget.patch({ |     await this.client.rest.api.guilds[this.id].widget.patch({ | ||||||
|       enabled: data.enabled, |       enabled: data.enabled, | ||||||
|  | @ -460,6 +460,7 @@ export class Guild extends Base { | ||||||
|   async deleteTemplate(code: string): Promise<Guild> { |   async deleteTemplate(code: string): Promise<Guild> { | ||||||
|     await this.client.rest.api.guilds[this.id].templates[code].delete() |     await this.client.rest.api.guilds[this.id].templates[code].delete() | ||||||
|     return this |     return this | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   /** Gets a preview of the guild. Returns GuildPreview. */ |   /** Gets a preview of the guild. Returns GuildPreview. */ | ||||||
|   async preview(): Promise<GuildPreview> { |   async preview(): Promise<GuildPreview> { | ||||||
|  |  | ||||||
|  | @ -169,6 +169,7 @@ export interface GuildWidgetPayload { | ||||||
|   channels: Array<{ id: string; name: string; position: number }> |   channels: Array<{ id: string; name: string; position: number }> | ||||||
|   members: MemberPayload[] |   members: MemberPayload[] | ||||||
|   presence_count: number |   presence_count: number | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| export type GuildChannelPayloads = | export type GuildChannelPayloads = | ||||||
|   | GuildTextChannelPayload |   | GuildTextChannelPayload | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue