Ajout du token pour l'api genius dans setup.py

This commit is contained in:
Mylloon 2020-11-30 14:12:02 +01:00
parent b2dba444b3
commit ee9638b6dc
4 changed files with 8 additions and 7 deletions

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
UPDATE/
.dockerignore
Dockerfile
setup.py
tokens.py
cogs/music_old.py

View file

@ -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__

View file

@ -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: ''

View file

@ -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())