Author SHA1 Message Date
matthew 73eb59f295 forgot something 2023-04-11 23:04:35 +02:00
matthew 0758690543 revert the autojoin stuff 2023-04-11 23:03:50 +02:00
matthew 50c4ce8bb7 add support for multiple nodes 2023-04-11 22:33:48 +02:00
matthew f81c89119c Gotta remove shit to be compliant yaknow 2022-12-07 00:13:52 +01:00
4 changed files with 27 additions and 15 deletions
+5 -8
View File
@@ -129,15 +129,12 @@ class TuneBot(commands.Bot):
self.lavalink = self.create_lavalink(self.user.id)
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.add_node(
cfg["host"],
cfg["port"],
cfg["password"],
cfg["region"],
cfg["name"],
)
# 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"])
return client
async def get_context(self, message: Message, *, cls=CustomContext):
+14
View File
@@ -48,3 +48,17 @@ class InfoCommands(app_commands.Group):
f"Server CPU: `{cpu}`\n\n"
)
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)
-1
View File
@@ -105,7 +105,6 @@ 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")
+8 -6
View File
@@ -8,12 +8,14 @@
"prefix": "ck!",
"redis_url": "",
"redis_prefix": "",
"lavalink": {
"host": "",
"port": 2333,
"password": "",
"region": "",
"name": ""
"nodes": {
"example": {
"host": "",
"port": 2333,
"password": "",
"region": "",
"name": ""
}
},
"colors": {
"embed": "7289da"