mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
general improvement
This commit is contained in:
parent
a3a3d7b966
commit
1fbcd240a3
1 changed files with 4 additions and 7 deletions
11
bot.py
11
bot.py
|
@ -18,11 +18,9 @@ class MinearchyBot(commands.Bot):
|
||||||
log_webhook: discord.Webhook
|
log_webhook: discord.Webhook
|
||||||
up_ts: float
|
up_ts: float
|
||||||
|
|
||||||
embed_color = 0x3500FF
|
embed_color = 0x2C65FF
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, *, token: str, webhook_url: str) -> None:
|
||||||
self, *, token: str, webhook_url: str, suggestions_channel_id: int
|
|
||||||
) -> None:
|
|
||||||
ip = "play.landsofminearchy.com"
|
ip = "play.landsofminearchy.com"
|
||||||
self.mc_server = mcstatus.JavaServer.lookup(ip)
|
self.mc_server = mcstatus.JavaServer.lookup(ip)
|
||||||
self.mc_server.ip = ip
|
self.mc_server.ip = ip
|
||||||
|
@ -30,10 +28,9 @@ class MinearchyBot(commands.Bot):
|
||||||
|
|
||||||
self.token = token
|
self.token = token
|
||||||
self.webhook_url = webhook_url
|
self.webhook_url = webhook_url
|
||||||
self.suggestions_channel_id = suggestions_channel_id
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
command_prefix="=",
|
command_prefix="=",
|
||||||
owner_ids=set([512640455834337290]),
|
owner_ids={512640455834337290},
|
||||||
intents=discord.Intents(
|
intents=discord.Intents(
|
||||||
guilds=True,
|
guilds=True,
|
||||||
members=True,
|
members=True,
|
||||||
|
@ -52,7 +49,7 @@ class MinearchyBot(commands.Bot):
|
||||||
|
|
||||||
async def on_ready(self) -> None:
|
async def on_ready(self) -> None:
|
||||||
self.up_ts = time.time()
|
self.up_ts = time.time()
|
||||||
self.suggestions_channel = self.get_channel(self.suggestions_channel_id)
|
self.suggestions_channel = self.get_channel(955972394885984276)
|
||||||
print(f"\nConnected to Discord!\nUser: {self.user}\nID: {self.user.id}")
|
print(f"\nConnected to Discord!\nUser: {self.user}\nID: {self.user.id}")
|
||||||
await self.log_webhook.send("Bot is now online!")
|
await self.log_webhook.send("Bot is now online!")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue