import { integer , Internal , snowflake , User } from '.' ; /** https://discord.com/developers/docs/resources/guild#ban-object-ban-structure */ export interface Ban { /** the reason for the ban */ reason ? : string ; /** the banned user */ user : User ; } export namespace Ban { export namespace Event { /** https://discord.com/developers/docs/topics/gateway#guild-ban-add-guild-ban-add-event-fields */ export interface Add { /** id of the guild */ guild_id : snowflake ; /** the banned user */ user : User ; } /** https://discord.com/developers/docs/topics/gateway#guild-ban-remove-guild-ban-remove-event-fields */ export interface Remove { /** id of the guild */ guild_id : snowflake ; /** the unbanned user */ user : User ; } } export namespace Params { /** https://discord.com/developers/docs/resources/guild#create-guild-ban-json-params */ export interface Create { /** number of days to delete messages for (0-7) */ delete_message_days ? : integer ; /** reason for the ban (deprecated) */ reason ? : string ; } } } declare module './gateway' { interface GatewayEvents { /** user was banned from a guild */ GUILD_BAN_ADD : Ban . Event . Add ; /** user was unbanned from a guild */ GUILD_BAN_REMOVE : Ban . Event . Remove ; } } declare module './internal' { interface Internal { see https getGuildBans ( guild_id ) : Promise < Ban [ ] > ; see https getGuildBan ( guild_id , user_id ) : Promise < Ban > ; see https createGuildBan ( guild_id , user_id , params ) : Promise < void > ; see https removeGuildBan ( guild_id , user_id ) : Promise < void > ; } } Internal . define ( { '/guilds/{guild.id}/bans' : { GET : 'getGuildBans' , } , '/guilds/{guild.id}/bans/{user.id}' : { GET : 'getGuildBan' , PUT : 'createGuildBan' , DELETE : 'removeGuildBan' , } , } ) ;