Ajout du token pour l'api genius dans setup.py
This commit is contained in:
parent
b2dba444b3
commit
ee9638b6dc
4 changed files with 8 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
||||||
UPDATE/
|
UPDATE/
|
||||||
.dockerignore
|
.dockerignore
|
||||||
Dockerfile
|
Dockerfile
|
||||||
setup.py
|
tokens.py
|
||||||
cogs/music_old.py
|
cogs/music_old.py
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
|
|
||||||
#### __Setting up__
|
#### __Setting up__
|
||||||
|
|
||||||
- A `setup.py` file that contains:
|
- A `tokens.py` file in `cogs` folder that contains:
|
||||||
|
|
||||||
```py
|
```py
|
||||||
token = "your token"
|
token_discord = "your discord token"
|
||||||
|
token_genius = "your genius token"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### __Starting up__
|
#### __Starting up__
|
||||||
|
|
|
@ -17,12 +17,12 @@ import youtube_dl
|
||||||
from async_timeout import timeout
|
from async_timeout import timeout
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
|
# Genius API
|
||||||
from random import randint
|
from random import randint
|
||||||
import lyricsgenius
|
import lyricsgenius
|
||||||
import time
|
import time
|
||||||
|
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 API
|
genius = lyricsgenius.Genius(token)
|
||||||
genius = lyricsgenius.Genius("gmAB9NLNoDACxvcf5IjJKVVgbYx3UJ8CZmdQkFOitRfyFewI6qvZFe62x6EUETpK")
|
|
||||||
|
|
||||||
# Silence useless bug reports messages
|
# Silence useless bug reports messages
|
||||||
youtube_dl.utils.bug_reports_message = lambda: ''
|
youtube_dl.utils.bug_reports_message = lambda: ''
|
||||||
|
|
2
main.py
2
main.py
|
@ -5,7 +5,7 @@ from discord.ext import commands
|
||||||
from random import randint, choice
|
from random import randint, choice
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from pytz import timezone
|
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())
|
client = commands.Bot(command_prefix = ".", case_insensitive = True, intents = discord.Intents.all())
|
||||||
|
|
||||||
|
|
Reference in a new issue