Skip to content

Instantly share code, notes, and snippets.

@Roxxers
Created December 27, 2017 16:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Roxxers/67817b0efbb0b55a1623b68f8a75d068 to your computer and use it in GitHub Desktop.
Save Roxxers/67817b0efbb0b55a1623b68f8a75d068 to your computer and use it in GitHub Desktop.
import time
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="=", description="Role creation script for role colours. Author: Roxxers#7443")
roles = """Red: #ff000b
Light/Dark Red: #ce030d
Dark Red: #b4171e
Darker Red: #831316
Maroon: #6d0000
Violet Red: #ad3c4a
Light Pink: #fcacb0
Pink: #e58cc5
Hot Pink: #de488d
Pinkish: #e3275c
Magenta: #ff10ed
Orange: #ff8d31
Dark Orange: #f26f29
Orange Red: #e74c3c
Gold: #d4af3a
Eggshell: #ffffff
Burlywood: #c9b87e
Yellow: #f1c40f
Dark Yellow: #d3ac0e
Sea Green: #54f278
Dark Sea Green: #7ce084
Deep Sea Green: #8fbc85
Teal: #40eba2
Green: #2ecc61
Dark Green: #1b7331
Cyan: #00e0b7
Turquoise: #40d5a7
Bright Blue: #65baf3
Aqua: #348caf
Dark Blue: #1b29e7
Navy Blue: #040472
Sky Blue: #69c0ee
Baby Blue: #7289bc
Lavender: #8f8ec6
Purple Pink: #d493da
Roses Pink: #af86c0
Light Purple: #845cec
Indigo: #4e1595
Ghostly Purple: #432c58
Plum: #694b68
Purple: #843d8d
Dark Purple: #612c6b
Very Dark Purple: #2b0c20
Discord Dark Theme: #36393e
Silver: #bbc9cf
Slategray: #70807b
Dark Slategray: #304949
Rosy: #bc8f8f
Brown: #a04221
Hazelnut: #5b3a32
Black: #080000
Puke: #324705
Darker Puke: #25300d
Ice: #d8fff5
Orchid: #ee7ae9
Darker Lavender: #9f79ee
Neon Green: #00ff17
Avocado: #568203
Forest Green: #1f8b4c
Blurple: #6869e7
Blurple Purple: #6b65af
BEEP: #fa8171
BOOP - Christmas Red: #c74641
BOP: #ff7878
Dark Purpink: #961274
Crimson: #dc143c
Dark Salmon: #e9967a
Rebecca Purple: #663399
Moccasin: #ffefd5
Papayawhip: #ffe4b5
Light Coral: #f08080
Green Olives: #6b8e23
Peach Puff: #ffdab9
Summer Tan: #d2b48c
Powdered Blue: #b0e0e6
Cadet Blue: #5f9ea0
Royal Blue: #4169e1
Peru: #cd853f
Grellow: #addf2f
Khaki Pants: #f0e68c
Brick: #b22222
Antique White: #faebd7
Saddle Brown: #8b4513
Light Grellow: #baef1f
me me big girl: #398394
me me big boy: #786e2e
Cool Pink: #e660f1
Light Lavender: #c299fb
Lark Turquoise: #60b6a3
Lark Purpender: #9064dd
Very Light Grellow: #cff17f
Very Dark Forest Green: #203e31
Mint Green: #99efbe
Cool Light Pink: #fb7ddb
Light Bluvender: #666fa6
Halloween Orange: #ff6644
Peashooter: #c2f983
Bulbous Gold: #c2c97c
Diamond Blue: #b9f2ff
Sand: #c2b280
Melon: #bac9b1
Lunar Blue: #362c75
Lunar Purple: #4f2d82
Light Greblue: #abcdef
Light Brown: #81584c
Cotton Candy: #ffbad1
Lighter Lavender: #d8a9f0
Rotten Avocado: #3c3c09
Fresh Avocado: #8c9a0b
Snowman: #dcf0ed
Christmas Green: #21E582
Canevy Blue: #1D658D
"""
@bot.event
async def on_ready():
print("Logged in")
@bot.command(pass_context=True)
async def rolecreate(ctx):
for line in roles.splitlines():
line = line.split(":")
name = line[0]
colour = discord.Colour(int(line[1].replace(" #", "0x"), 16))
await bot.create_role(ctx.message.server, name=name, colour=colour)
print("Created {}".format(name))
time.sleep(1)
if __name__ == "__main__":
bot.run("[Token]")
@toemalin
Copy link

how do i run this to add the roles to my discord server

@D-RAZ
Copy link

D-RAZ commented Mar 7, 2021

how do i run this to add the roles to my discord server

did u figured it out?

@psychoeblyat
Copy link

how do i run this to add the roles to my discord server

did u figured it out?

go to the roles section and click on the role, then select costom colour beside default, then you'll find the colour code bar, you just have to write the code after the hashtag and confirm, dassit.

@Redrum22524
Copy link

How do u use this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment