diff --git a/.gitignore b/.gitignore index 680a6b1..2d01f76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ UPDATE/ .dockerignore Dockerfile -setup.py +tokens.py cogs/music_old.py diff --git a/README.md b/README.md index 58d9484..3c50330 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,11 @@ #### __Setting up__ -- A `setup.py` file that contains: +- A `tokens.py` file in `cogs` folder that contains: ```py -token = "your token" +token_discord = "your discord token" +token_genius = "your genius token" ``` #### __Starting up__ diff --git a/cogs/music.py b/cogs/music.py index 4d8579a..45ad0d6 100644 --- a/cogs/music.py +++ b/cogs/music.py @@ -17,12 +17,12 @@ import youtube_dl from async_timeout import timeout from discord.ext import commands +# Genius API from random import randint import lyricsgenius import time - -# Genius API -genius = lyricsgenius.Genius("gmAB9NLNoDACxvcf5IjJKVVgbYx3UJ8CZmdQkFOitRfyFewI6qvZFe62x6EUETpK") +from tokens import token_genius as token # à l'importation de l'extension, music.py se retrouve dans le '/' et non dans 'cogs/', ignorez l'erreur +genius = lyricsgenius.Genius(token) # Silence useless bug reports messages youtube_dl.utils.bug_reports_message = lambda: '' diff --git a/main.py b/main.py index 68d4cdd..f491c7e 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ from discord.ext import commands from random import randint, choice from datetime import datetime, timedelta from pytz import timezone -from setup import token +from tokens import token_discord as token client = commands.Bot(command_prefix = ".", case_insensitive = True, intents = discord.Intents.all())