|
|
@ -11,7 +11,7 @@ from disco.util.logging import LoggingClass |
|
|
|
from disco.util.sanitize import S |
|
|
|
from disco.types.user import User |
|
|
|
from disco.types.message import Message |
|
|
|
from disco.types.guild import Guild, GuildMember, GuildBan, PruneCount, Role, GuildEmoji, AuditLogEntry |
|
|
|
from disco.types.guild import Guild, GuildMember, GuildBan, GuildEmbed, PruneCount, Role, GuildEmoji, AuditLogEntry |
|
|
|
from disco.types.channel import Channel |
|
|
|
from disco.types.invite import Invite |
|
|
|
from disco.types.voice import VoiceRegion |
|
|
@ -516,6 +516,18 @@ class APIClient(LoggingClass): |
|
|
|
r = self.http(Routes.GUILDS_VANITY_URL_GET, dict(guild=guild)) |
|
|
|
return Invite.create(self.client, r.json()) |
|
|
|
|
|
|
|
def guilds_embed_get(self, guild): |
|
|
|
r = self.http(Routes.GUILDS_EMBED_GET, dict(guild=guild)) |
|
|
|
return GuildEmbed.create(self.client, r.json()) |
|
|
|
|
|
|
|
def guilds_embed_modify(self, guild, reason=None, **kwargs): |
|
|
|
r = self.http( |
|
|
|
Routes.GUILDS_EMBED_MODIFY, |
|
|
|
dict(guild=guild), |
|
|
|
json=kwargs, |
|
|
|
headers=_reason_header(reason)) |
|
|
|
return GuildEmbed.create(self.client, r.json()) |
|
|
|
|
|
|
|
def guilds_webhooks_list(self, guild): |
|
|
|
r = self.http(Routes.GUILDS_WEBHOOKS_LIST, dict(guild=guild)) |
|
|
|
return Webhook.create_map(self.client, r.json()) |
|
|
|