diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/help_channels/_cog.py | 2 | ||||
| -rw-r--r-- | bot/exts/help_channels/_name.py | 12 | ||||
| -rw-r--r-- | bot/resources/elements.json | 119 | ||||
| -rw-r--r-- | bot/resources/foods.json | 52 | 
4 files changed, 59 insertions, 126 deletions
| diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index 6abf99810..1c730dce9 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -54,7 +54,7 @@ class HelpChannels(commands.Cog):      * Contains channels which aren't in use      * Channels are used to refill the Available category -    Help channels are named after the chemical elements in `bot/resources/elements.json`. +    Help channels are named after the foods in `bot/resources/foods.json`.      """      def __init__(self, bot: Bot): diff --git a/bot/exts/help_channels/_name.py b/bot/exts/help_channels/_name.py index 728234b1e..061f855ae 100644 --- a/bot/exts/help_channels/_name.py +++ b/bot/exts/help_channels/_name.py @@ -14,11 +14,11 @@ log = logging.getLogger(__name__)  def create_name_queue(*categories: discord.CategoryChannel) -> deque:      """ -    Return a queue of element names to use for creating new channels. +    Return a queue of food names to use for creating new channels.      Skip names that are already in use by channels in `categories`.      """ -    log.trace("Creating the chemical element name queue.") +    log.trace("Creating the food name queue.")      used_names = _get_used_names(*categories) @@ -31,7 +31,7 @@ def create_name_queue(*categories: discord.CategoryChannel) -> deque:  def _get_names() -> t.List[str]:      """ -    Return a truncated list of prefixed element names. +    Return a truncated list of prefixed food names.      The amount of names is configured with `HelpChannels.max_total_channels`.      The prefix is configured with `HelpChannels.name_prefix`. @@ -39,10 +39,10 @@ def _get_names() -> t.List[str]:      count = constants.HelpChannels.max_total_channels      prefix = constants.HelpChannels.name_prefix -    log.trace(f"Getting the first {count} element names from JSON.") +    log.trace(f"Getting the first {count} food names from JSON.") -    with Path("bot/resources/elements.json").open(encoding="utf-8") as elements_file: -        all_names = json.load(elements_file) +    with Path("bot/resources/foods.json").open(encoding="utf-8") as foods_file: +        all_names = json.load(foods_file)      if prefix:          return [prefix + name for name in all_names[:count]] diff --git a/bot/resources/elements.json b/bot/resources/elements.json deleted file mode 100644 index a3ac5b99f..000000000 --- a/bot/resources/elements.json +++ /dev/null @@ -1,119 +0,0 @@ -[ -    "hydrogen", -    "helium", -    "lithium", -    "beryllium", -    "boron", -    "carbon", -    "nitrogen", -    "oxygen", -    "fluorine", -    "neon", -    "sodium", -    "magnesium", -    "aluminium", -    "silicon", -    "phosphorus", -    "sulfur", -    "chlorine", -    "argon", -    "potassium", -    "calcium", -    "scandium", -    "titanium", -    "vanadium", -    "chromium", -    "manganese", -    "iron", -    "cobalt", -    "nickel", -    "copper", -    "zinc", -    "gallium", -    "germanium", -    "arsenic", -    "bromine", -    "krypton", -    "rubidium", -    "strontium", -    "yttrium", -    "zirconium", -    "niobium", -    "molybdenum", -    "technetium", -    "ruthenium", -    "rhodium", -    "palladium", -    "silver", -    "cadmium", -    "indium", -    "tin", -    "antimony", -    "tellurium", -    "iodine", -    "xenon", -    "caesium", -    "barium", -    "lanthanum", -    "cerium", -    "praseodymium", -    "neodymium", -    "promethium", -    "samarium", -    "europium", -    "gadolinium", -    "terbium", -    "dysprosium", -    "holmium", -    "erbium", -    "thulium", -    "ytterbium", -    "lutetium", -    "hafnium", -    "tantalum", -    "tungsten", -    "rhenium", -    "osmium", -    "iridium", -    "platinum", -    "gold", -    "mercury", -    "thallium", -    "lead", -    "bismuth", -    "polonium", -    "astatine", -    "radon", -    "francium", -    "radium", -    "actinium", -    "thorium", -    "protactinium", -    "uranium", -    "neptunium", -    "plutonium", -    "americium", -    "curium", -    "berkelium", -    "californium", -    "einsteinium", -    "fermium", -    "mendelevium", -    "nobelium", -    "lawrencium", -    "rutherfordium", -    "dubnium", -    "seaborgium", -    "bohrium", -    "hassium", -    "meitnerium", -    "darmstadtium", -    "roentgenium", -    "copernicium", -    "nihonium", -    "flerovium", -    "moscovium", -    "livermorium", -    "tennessine", -    "oganesson" -] diff --git a/bot/resources/foods.json b/bot/resources/foods.json new file mode 100644 index 000000000..61d9ea98f --- /dev/null +++ b/bot/resources/foods.json @@ -0,0 +1,52 @@ +[ +    "apple", +    "avocado", +    "bagel", +    "banana", +    "bread", +    "broccoli", +    "burrito", +    "cake", +    "candy", +    "carrot", +    "cheese", +    "cherries", +    "chestnut", +    "chili", +    "chocolate", +    "coconut", +    "coffee", +    "cookie", +    "corn", +    "croissant", +    "cupcake", +    "donut", +    "dumpling", +    "falafel", +    "grapes", +    "honey", +    "kiwi", +    "lemon", +    "lollipop", +    "mango", +    "mushroom", +    "orange", +    "pancakes", +    "peanut", +    "pear", +    "pie", +    "pineapple", +    "popcorn", +    "potato", +    "pretzel", +    "ramen", +    "rice", +    "salad", +    "spaghetti", +    "stew", +    "strawberry", +    "sushi", +    "taco", +    "tomato", +    "watermelon" +] | 
