mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-04 20:25:25 +02:00
Allow the bot to work with not having Administrator permissions (#47)
This commit is contained in:
committed by
GitHub
parent
21400679b6
commit
600627d2e2
@ -135,6 +135,8 @@ class DiscordREST:
|
||||
def get_widget(self, guild_id):
|
||||
_endpoint = _DISCORD_API_BASE + "/servers/{guild_id}/widget.json".format(guild_id=guild_id)
|
||||
embed = self.get_guild_embed(guild_id)
|
||||
if not embed.get("success", True):
|
||||
return {"success": False}
|
||||
if not embed['content']['enabled']:
|
||||
self.modify_guild_embed(guild_id, enabled=True, channel_id=guild_id)
|
||||
widget = requests.get(_endpoint).json()
|
||||
|
Reference in New Issue
Block a user