How to use the hypixel.GuildIDNotValid function in hypixel

To help you get started, we’ve selected a few hypixel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robingall2910 / RobTheBoat / commands / hypixel.py View on Github external
except KeyError:
                pass
            try:
                embed.add_field(name='Guild Tag Color', value=f"{guild.JSON['tagColor']}")
            except KeyError:
                embed.add_field(name='Guild Tag Color', value="GRAY")
            if sys.platform == "windows":
                embed.set_footer(
                    text=f"Requested by: {ctx.message.author} / {datetime.fromtimestamp(time.time()).strftime('%A, %B %#d, %Y at %#I:%M %p %Z')}",
                    icon_url=ctx.message.author.avatar_url)
            elif sys.platform == "linux":
                embed.set_footer(
                    text=f"Requested by: {ctx.message.author} / {datetime.fromtimestamp(time.time()).strftime('%A, %B %-d, %Y at %-I:%M %p %Z')}",
                    icon_url=ctx.message.author.avatar_url)
            await ctx.send(embed=embed)
        except hypixel.GuildIDNotValid:
            await ctx.send("Guild not found! Are you sure you typed it correctly?")
        except Exception:
            await ctx.send(traceback.format_exc())
github Snuggle / hypixel.py / hypixel.py View on Github external
def __init__(self, GuildID):
        try:
            if len(GuildID) == 24:
                self.GuildID = GuildID
                self.JSON = getJSON('guild', id=GuildID)
        except Exception as chainedException:
            raise GuildIDNotValid(GuildID) from chainedException