-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config.py
93 lines (79 loc) · 3.79 KB
/
Config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
"""
SanyaBot configuration. Includes texts for descriptions,
images, Bot configuration like «Developer Mode» and
some permanent data like links and credentials.
"""
import discord, os
class Bot:
# The time that user will be stored in the bot's cache
cache_time: int = 900
# Max amount of users that can be stored in cache at the same time
max_cached_users: int = 1000
# 0 - No actions will be logged
# 1 - Actions will be logged to console only
# 2 - Actions will be logged to txt file in ./logs/{time}.txt
# 3 - Actions will be logged both to terminal and to txt file
logs_lvl: int = 3
# Used when Bot is unable to detect user's language
default_language: str = "en"
# Descriptions for all commands (Displayed in help command)
def commands_descriptions(language: str) -> list[list[str]]:
if language == "ru":
return [
["ping", "Текущий пинг бота"],
["help", "Вы сейчас тут"],
["play", "Включить или добавить трек в очередь"],
["stop", "Остановить плеер, отключить бота от ГК"],
["loop", "Зациклить текущий трек"],
["skip", "Пропустить трек"],
["queue", "Просмотр очереди треков"],
["pause", "Остановить проигрывание"],
["status", "Информация о текущем статусе бота"],
["volume", "Изменить громкость плеера"],
["resume", "Возобновить проигрывание"],
["replay", "Проиграть текущий трек заново"],
["previous", "Включить предыдущий трек"],
["language", "Изменить язык сани"]
]
else:
return [
["ping", "Current Sanya's ping"],
["help", "You are here right now"],
["play", "Play or add track to the queue"],
["stop", "Stop player, disconnect bot from VC"],
["loop", "Loop current track"],
["skip", "Skip track"],
["queue", "View current tracks queue"],
["pause", "Pause playback"],
["status", "Info about current bot status"],
["volume", "Change player volume"],
["resume", "Resume playback"],
["replay", "Replay track"],
["previous", "Play previous track"],
["language", "Change bot language for yourself"]
]
# You can change bot prefix here.
prefix: str = "s!"
# Bot presence type and name (text)
#
# Available types are:
# - discord.ActivityType.watching
# - discord.ActivityType.streaming
# - discord.ActivityType.competing
# - discord.ActivityType.listening
# - discord.ActivityType.playing
presence = [discord.ActivityType.watching, "тебе в душу"]
# Stuff for music to work.
#
# Files to host Lavalink on your PC:
# Lavalink.jar - https://ci.fredboat.com/viewLog.html?buildId=lastSuccessful&buildTypeId=Lavalink_Build&tab=artifacts&guest=1
# application.yml - https://github.com/freyacodes/Lavalink#server-configuration
class Lavalink:
# Example: https://yourhost.com:8080
def URI() -> str: return os.getenv("LAVALINK_URI")
# Example: abc1234
def password() -> str: return os.getenv("LAVALINK_PWD")
# Should bot use http(s):// or ws://
def useHTTP() -> str: return os.getenv("LAVALINK_USE_HTTP")
# Is the domain secured with certificate
def secure() -> str: return os.getenv("LAVALINK_SECURE")