Author SHA1 Message Date
matthew c01e773c31 Add Privacy Policy and Terms of Service command 2022-12-06 22:55:40 +01:00
3 changed files with 15 additions and 13 deletions
+8 -5
View File
@@ -129,12 +129,15 @@ class TuneBot(commands.Bot):
self.lavalink = self.create_lavalink(self.user.id)
def create_lavalink(self, user_id: int) -> "lavalink.Client":
nodes = self.config["nodes"]
cfg = self.config["lavalink"]
client: lavalink.Client = lavalink.Client(user_id, player=CustomPlayer)
# get the lavalink nodes from the config
for node in nodes:
client.add_node(nodes[node]["host"], nodes[node]["port"], nodes[node]["password"], nodes[node]["region"], nodes[node]["name"])
client.add_node(
cfg["host"],
cfg["port"],
cfg["password"],
cfg["region"],
cfg["name"],
)
return client
async def get_context(self, message: Message, *, cls=CustomContext):
+1
View File
@@ -105,6 +105,7 @@ class SourceCommands(app_commands.Group):
await ctx.response.send_message(embed=embed)
class SettingCommands(app_commands.Group):
def __init__(self, bot: "TuneBot"):
super().__init__(name="settings", description="Tweak and customize")
+6 -8
View File
@@ -8,14 +8,12 @@
"prefix": "ck!",
"redis_url": "",
"redis_prefix": "",
"nodes": {
"example": {
"host": "",
"port": 2333,
"password": "",
"region": "",
"name": ""
}
"lavalink": {
"host": "",
"port": 2333,
"password": "",
"region": "",
"name": ""
},
"colors": {
"embed": "7289da"