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. */ | ||||
|   async editPositions( | ||||
|     ...positions: Array<{ id: string | GuildChannel; position: number | null }> | ||||
|     ...positions: Array<{ id: string | GuildChannels; position: number | null }> | ||||
|   ): Promise<GuildChannelsManager> { | ||||
|     if (positions.length === 0) | ||||
|       throw new Error('No channel positions to change specified') | ||||
|  |  | |||
|  | @ -18,7 +18,6 @@ import { | |||
| } from '../types/guild.ts' | ||||
| import { BaseManager } from './base.ts' | ||||
| import { MembersManager } from './members.ts' | ||||
| import { fetchAuto } from '../../deps.ts' | ||||
| import { Emoji } from '../structures/emoji.ts' | ||||
| 
 | ||||
| export class GuildManager extends BaseManager<GuildPayload, Guild> { | ||||
|  | @ -60,6 +59,7 @@ export class GuildManager extends BaseManager<GuildPayload, Guild> { | |||
|       typeof template === 'object' ? template.code : template | ||||
|     ].post({ name, icon }) | ||||
|     return new Guild(this.client, guild) | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|    * 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. */ | ||||
|   async editWidget(data: { | ||||
|     enabled?: boolean | ||||
|     channel?: string | GuildChannel | ||||
|     channel?: string | GuildChannels | ||||
|   }): Promise<Guild> { | ||||
|     await this.client.rest.api.guilds[this.id].widget.patch({ | ||||
|       enabled: data.enabled, | ||||
|  | @ -460,7 +460,8 @@ export class Guild extends Base { | |||
|   async deleteTemplate(code: string): Promise<Guild> { | ||||
|     await this.client.rest.api.guilds[this.id].templates[code].delete() | ||||
|     return this | ||||
|      | ||||
|   } | ||||
| 
 | ||||
|   /** Gets a preview of the guild. Returns GuildPreview. */ | ||||
|   async preview(): Promise<GuildPreview> { | ||||
|     return this.client.guilds.preview(this.id) | ||||
|  |  | |||
|  | @ -169,7 +169,8 @@ export interface GuildWidgetPayload { | |||
|   channels: Array<{ id: string; name: string; position: number }> | ||||
|   members: MemberPayload[] | ||||
|   presence_count: number | ||||
|    | ||||
| } | ||||
| 
 | ||||
| export type GuildChannelPayloads = | ||||
|   | GuildTextChannelPayload | ||||
|   | GuildVoiceChannelPayload | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue