|
|
@ -298,13 +298,13 @@ class APIClient(LoggingClass): |
|
|
|
verification_level=None, |
|
|
|
default_message_notifications=None, |
|
|
|
explicit_content_filter=None, |
|
|
|
roles=[], |
|
|
|
channels=[]): |
|
|
|
roles=None, |
|
|
|
channels=None): |
|
|
|
|
|
|
|
payload = { |
|
|
|
'name': name, |
|
|
|
'roles': [i.to_dict() for i in roles], |
|
|
|
'channels': [i.to_dict() for i in channels], |
|
|
|
'roles': (roles or []), |
|
|
|
'channels': (channels or []), |
|
|
|
} |
|
|
|
|
|
|
|
payload.update(optional( |
|
|
@ -416,8 +416,8 @@ class APIClient(LoggingClass): |
|
|
|
r = self.http(Routes.GUILDS_BANS_LIST, dict(guild=guild)) |
|
|
|
return GuildBan.create_hash(self.client, 'user.id', r.json()) |
|
|
|
|
|
|
|
def guilds_ban_get(self, guild, user): |
|
|
|
r = self.http(Routes.GUILDS_BAN_GET, dict(guild=guild, user=user)) |
|
|
|
def guilds_bans_get(self, guild, user): |
|
|
|
r = self.http(Routes.GUILDS_BANS_GET, dict(guild=guild, user=user)) |
|
|
|
return GuildBan.create(self.client, r.json()) |
|
|
|
|
|
|
|
def guilds_bans_create(self, guild, user, delete_message_days=0, reason=None): |
|
|
@ -504,8 +504,8 @@ class APIClient(LoggingClass): |
|
|
|
r = self.http(Routes.GUILDS_WEBHOOKS_LIST, dict(guild=guild)) |
|
|
|
return Webhook.create_map(self.client, r.json()) |
|
|
|
|
|
|
|
def guilds_emoji_get(self, guild, emoji): |
|
|
|
r = self.http(Routes.GUILDS_EMOJI_GET, dict(guild=guild, emoji=emoji)) |
|
|
|
def guilds_emojis_get(self, guild, emoji): |
|
|
|
r = self.http(Routes.GUILDS_EMOJIS_GET, dict(guild=guild, emoji=emoji)) |
|
|
|
return GuildEmoji.create(self.client, r.json()) |
|
|
|
|
|
|
|
def guilds_emojis_list(self, guild): |
|
|
|