mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-22 00:57:48 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73eb59f295 | ||
|
|
0758690543 | ||
|
|
50c4ce8bb7 | ||
|
|
f81c89119c |
@@ -129,15 +129,12 @@ class TuneBot(commands.Bot):
|
|||||||
self.lavalink = self.create_lavalink(self.user.id)
|
self.lavalink = self.create_lavalink(self.user.id)
|
||||||
|
|
||||||
def create_lavalink(self, user_id: int) -> "lavalink.Client":
|
def create_lavalink(self, user_id: int) -> "lavalink.Client":
|
||||||
cfg = self.config["lavalink"]
|
nodes = self.config["nodes"]
|
||||||
|
|
||||||
client: lavalink.Client = lavalink.Client(user_id, player=CustomPlayer)
|
client: lavalink.Client = lavalink.Client(user_id, player=CustomPlayer)
|
||||||
client.add_node(
|
# get the lavalink nodes from the config
|
||||||
cfg["host"],
|
for node in nodes:
|
||||||
cfg["port"],
|
client.add_node(nodes[node]["host"], nodes[node]["port"], nodes[node]["password"], nodes[node]["region"], nodes[node]["name"])
|
||||||
cfg["password"],
|
|
||||||
cfg["region"],
|
|
||||||
cfg["name"],
|
|
||||||
)
|
|
||||||
return client
|
return client
|
||||||
|
|
||||||
async def get_context(self, message: Message, *, cls=CustomContext):
|
async def get_context(self, message: Message, *, cls=CustomContext):
|
||||||
|
|||||||
@@ -48,3 +48,17 @@ class InfoCommands(app_commands.Group):
|
|||||||
f"Server CPU: `{cpu}`\n\n"
|
f"Server CPU: `{cpu}`\n\n"
|
||||||
)
|
)
|
||||||
await ctx.response.send_message(embed=embed)
|
await ctx.response.send_message(embed=embed)
|
||||||
|
|
||||||
|
@app_commands.command(name="tos", description="Terms of Service")
|
||||||
|
async def tos(self, ctx: Interaction):
|
||||||
|
embed = create_embed(ctx.user)
|
||||||
|
embed.title = "Terms of Service (ToS)"
|
||||||
|
embed.description = "[https://exobot.site/static/tos.html](https://exobot.site/static/tos.html)"
|
||||||
|
await ctx.response.send_message(embed=embed)
|
||||||
|
|
||||||
|
@app_commands.command(name="privacy", description="Privacy Policy")
|
||||||
|
async def privacy(self, ctx: Interaction):
|
||||||
|
embed = create_embed(ctx.user)
|
||||||
|
embed.title = "Privacy Policy"
|
||||||
|
embed.description = "[https://exobot.site/static/privacy.html](https://exobot.site/static/privacy.html)"
|
||||||
|
await ctx.response.send_message(embed=embed)
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ class SourceCommands(app_commands.Group):
|
|||||||
|
|
||||||
await ctx.response.send_message(embed=embed)
|
await ctx.response.send_message(embed=embed)
|
||||||
|
|
||||||
|
|
||||||
class SettingCommands(app_commands.Group):
|
class SettingCommands(app_commands.Group):
|
||||||
def __init__(self, bot: "TuneBot"):
|
def __init__(self, bot: "TuneBot"):
|
||||||
super().__init__(name="settings", description="Tweak and customize")
|
super().__init__(name="settings", description="Tweak and customize")
|
||||||
|
|||||||
+8
-6
@@ -8,12 +8,14 @@
|
|||||||
"prefix": "ck!",
|
"prefix": "ck!",
|
||||||
"redis_url": "",
|
"redis_url": "",
|
||||||
"redis_prefix": "",
|
"redis_prefix": "",
|
||||||
"lavalink": {
|
"nodes": {
|
||||||
"host": "",
|
"example": {
|
||||||
"port": 2333,
|
"host": "",
|
||||||
"password": "",
|
"port": 2333,
|
||||||
"region": "",
|
"password": "",
|
||||||
"name": ""
|
"region": "",
|
||||||
|
"name": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"colors": {
|
"colors": {
|
||||||
"embed": "7289da"
|
"embed": "7289da"
|
||||||
|
|||||||
Reference in New Issue
Block a user