How to use the discord.Color function in discord

To help you get started, we’ve selected a few discord 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 corpnewt / CorpBot.py / Cogs / CogManager.py View on Github external
discord.Color.teal(),
				discord.Color.dark_teal(),
				discord.Color.green(),
				discord.Color.dark_green(),
				discord.Color.blue(),
				discord.Color.dark_blue(),
				discord.Color.purple(),
				discord.Color.dark_purple(),
				discord.Color.magenta(),
				discord.Color.dark_magenta(),
				discord.Color.gold(),
				discord.Color.dark_gold(),
				discord.Color.orange(),
				discord.Color.dark_orange(),
				discord.Color.red(),
				discord.Color.dark_red(),
				discord.Color.lighter_grey(),
				discord.Color.dark_grey(),
				discord.Color.light_grey(),
				discord.Color.darker_grey(),
				discord.Color.blurple(),
				discord.Color.greyple()
				]
github Maselkov / GW2Bot / guildwars2 / characters.py View on Github external
def __init__(self, cog, data):
        self.cog = cog
        self.data = data
        self.name = data["name"]
        self.race = data["race"]
        self.gender = data["gender"].lower()
        self.profession = data["profession"].lower()
        self.level = data["level"]
        self.specializations = data.get("specializations")
        self.color = discord.Color(
            int(self.cog.gamedata["professions"][self.profession]["color"],
                16))
        self.created = datetime.datetime.strptime(data["created"],
                                                  "%Y-%m-%dT%H:%M:%Sz")
        self.age = data["age"]
        self.spec_cache = {}
github Milotrince / discord-roombot / roombot / cogs / basicroom.py View on Github external
async def ls(self, ctx):
        settings = Settings.get_for(ctx.guild.id)
        rooms = Room.find(guild=ctx.guild.id)
        embed = discord.Embed(color=discord.Color.blurple())
        count = 0

        for room_data in rooms:
            count += 1
            room = Room.from_query(room_data)

            description = room.description if room.description else "{}: {}".format(settings.get_text('players'), ', '.join(room.players))
            embed.add_field(
                name="{}{} ({}/{})".format(":lock: " if room.lock else "", room.activity, len(room.players), room.size),
                value=description,
                inline=False )
        if count > 0:
            embed.title = "{} ({})".format(settings.get_text('rooms'), count)
            await ctx.send(embed=embed)
        else:
            await ctx.send(settings.get_text('no_rooms'))
github cree-py / RemixBot / ext / utils.py View on Github external
def random_color():
    color = ('#%06x' % random.randint(8, 0xFFFFFF))
    color = int(color[1:], 16)
    color = discord.Color(value=color)
    return color
github mdiller / MangoByte / cogs / pokemon.py View on Github external
def poke_color(color):
	return {
		"black": discord.Color(0x000000),
		"blue": discord.Color.blue(),
		"brown": discord.Color(0xD2691E),
		"gray": discord.Color(0xA9A9A9),
		"green": discord.Color.green(),
		"pink": discord.Color(0xFF69B4),
		"purple": discord.Color.purple(),
		"red": discord.Color.red(),
		"white": discord.Color(0xFFFFFF),
		"yellow": discord.Color(0xFFFF00)
	}[color]
github Magic-Bots / xenon / xenon / cogs / builder.py View on Github external
},
                {
                    "name": "Red",
                    "color": discord.Color(0xE62345)
                },
                {
                    "name": "Teal",
                    "color": discord.Color(0x469990)
                },
                {
                    "name": "White",
                    "color": discord.Color(0xFFFFFF)
                },
                {
                    "name": "Yellow",
                    "color": discord.Color(0xFFE119)
                },
            ]

            for kwargs in color_roles:
                await ctx.guild.create_role(**kwargs, reason=reason)

        if options["game_specific_roles"]:
            game_roles = ["──── Games ────", "minecraft", "fortnite", "apex", "pubg", "roblox", "destiny", "rainbow 6"]
            for name in game_roles:
                await ctx.guild.create_role(name=name, reason=reason)

        if options["info_channels"]:
            info_category = await ctx.guild.create_category(
                name="Info",
                overwrites={
                    ctx.guild.default_role: discord.PermissionOverwrite(
github r-spacex / SpaceXLaunchBot / spacexlaunchbot / config.py View on Github external
# How many minutes to wait in-between checking the SpaceX API for updates
# This does not take into account time taken to process the data and to send out notifs
NOTIF_TASK_API_INTERVAL = 1

# How many minutes to look into the future for an upcoming launch time
# Must be > NOTIF_TASK_API_INTERVAL else you risk skipping a launch
NOTIF_TASK_LAUNCH_DELTA = 30

#
# Misc
#

COLOUR_ERROR_RED = Color.from_rgb(255, 0, 0)
COLOUR_FALCON_RED = Color.from_rgb(238, 15, 70)
COLOUR_INFO_ORANGE = Color.from_rgb(200, 74, 0)
github nh-server / Kurisu / cogs / assistance.py View on Github external
async def flashcart(self, ctx):
        """Launcher for old flashcarts"""
        embed = discord.Embed(title="Launcher for old flashcards (r4,m3,dstt,dsx,etc)", color=discord.Color(0x42f462))
        embed.set_author(name="Apache Thunder", url="https://gbatemp.net/threads/r4-stage2-twl-flashcart-launcher-and-perhaps-other-cards-soon%E2%84%A2.416434/")
        embed.set_thumbnail(url="https://gbatemp.net/data/avatars/m/105/105648.jpg")
        embed.url = "https://gbatemp.net/threads/r4-stage2-twl-flashcart-launcher-and-perhaps-other-cards-soon%E2%84%A2.416434/"
        embed.description = "Launcher for old flashcards"
        await ctx.send(embed=embed)
github Harmon758 / Harmonbot / Discord / clients.py View on Github external
# Constants
		## Custom
		self.version = "1.0.0-rc.6"
		self.owner_id = 115691005197549570
		self.listener_id = 180994984038760448
		self.cache_channel_id = 254051856219635713
		self.changelog = "https://discord.gg/a2rbZPu"
		self.console_line_limit = 167
		self.console_message_prefix = "Discord Harmonbot: "
		self.emoji_skin_tone = self.emote_skin_tone = '\N{EMOJI MODIFIER FITZPATRICK TYPE-3}'  # TODO: use everywhere
		self.fake_ip = "nice try"
		self.fake_location = "Fort Yukon, Alaska"
		self.library_path = "D:/Music/"
		self.user_agent = "Discord Bot"  # TODO: Make more specific?
		self.bot_color = self.bot_colour = discord.Color.blurple()  # previously 0x738bd7
		self.rss_color = self.rss_colour = 0xfa9b39  # other options: f26522, ee802f, ff6600; http://www.strawpoll.me/12384409
		self.twitch_color = self.twitch_colour = 0x6441a4
		self.twitter_color = self.twitter_colour = 0x00ACED
		self.youtube_color = self.youtube_colour = 0xcd201f  # change to ff0000?; previously on https://www.youtube.com/yt/brand/color.html
		self.twitch_icon_url = "https://s.jtvnw.net/jtv_user_pictures/hosted_images/GlitchIcon_purple.png"
		self.twitter_icon_url = "https://abs.twimg.com/icons/apple-touch-icon-192x192.png"
		self.youtube_icon_url = "https://www.youtube.com/yts/img/ringo/hitchhiker/video_youtube_red-vflovGTdz.png"
		self.dark_theme_background_color = self.dark_theme_background_colour = 0x36393e
		self.white_color = self.white_colour = 0xffffff
		### Colors from https://discordapp.com/branding
		self.greyple_color = self.greyple_colour = 0x99aab5
		self.dark_but_not_black_color = self.dark_but_not_black_colour = 0x2c2f33
		self.not_quite_black_color = self.not_quite_black_colour = 0x23272a
		## Constant
		self.CODE_BLOCK = "```\n{}\n```"  # TODO: Change to method?
		self.PY_CODE_BLOCK = "```py\n{}\n```"  # TODO: Change to method?