Skip to content

Commit

Permalink
Added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shahriyardx committed Mar 12, 2022
1 parent 734670b commit 0ad7981
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/bot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import os
from dotenv import load_dotenv
from discord.ext import commands

load_dotenv(".env")
bot = commands.Bot(command_prefix='?')

bot.lavalink_nodes = [
{"host": "losingtime.dpaste.org", "port": 2124, "password": "SleepingOnTrains"},
# Can have multiple nodes here
]

# If you want to use spotify search
bot.spotify_credentials = {
'client_id': 'CLIENT_ID_HERE',
'client_secret': 'CLIENT_SECRET_HERE'
}

@bot.event
async def on_ready():
print(f"{bot.user} is ready")

bot.load_extension('dismusic')
bot.load_extension('jishaku')
bot.run(os.getenv("TOKEN"))
2 changes: 2 additions & 0 deletions examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python-dotenv
jishaku

0 comments on commit 0ad7981

Please sign in to comment.