From e8d69e92e9e9469d5fd4ee1e2bafb32c349113ba Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 27 Jul 2020 19:46:14 +0100 Subject: [PATCH] Adding function to generate random hex colour --- settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/settings.py b/settings.py index 3b7229ff..c807726b 100644 --- a/settings.py +++ b/settings.py @@ -1,3 +1,4 @@ +import random from contextlib import closing from discord import Colour @@ -49,6 +50,12 @@ colors = { # Grabbing the list of colours colour_list = [c for c in colors.values()] + +def rndColour(): + """Generate a random hex colour""" + return "#{:06x}".format(random.randint(0, 0xFFFFFF)) + + # Store guildID's and modlog channel within a cached dictionary modlogs = {}