Skip to content

Commit

Permalink
config more bot
Browse files Browse the repository at this point in the history
  • Loading branch information
MegumiKatou02 committed Dec 20, 2024
1 parent 08d5f0d commit 0de4484
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cogs/stats/bot_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def info(self, interaction: discord.Interaction):

version_bot = setup_bot.VERSION

embed = discord.Embed(title=f"Thông tin bot: {bot_name}", color=0xff0033)
embed = discord.Embed(title=f"Thông tin bot: {bot_name}", color=0xFFFFFF)
embed.set_thumbnail(url=bot_avatar)
embed.add_field(name="Phiên bản", value=version_bot, inline=False)
embed.add_field(name="Số lượng server", value=guild_count, inline=False)
Expand Down
8 changes: 8 additions & 0 deletions individual/bot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Khu_Wibu": {
"states": "Khu Wibu"
},
"Haiku_team": {
"states": "Haiku team"
}
}
12 changes: 8 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import setup_bot
import individual
import json

CLIENT_ID = setup_bot.CLIENT_ID

Expand All @@ -28,16 +29,21 @@

clients = commands.Bot(command_prefix='>>', intents=intents)

config_bot = "individual/bot.json"

@clients.event
async def on_ready():
print("ready !!!")
print("----------")

with open("individual/bot.json", "r", encoding="utf-8") as f:
config_bot = json.load(f)
state = config_bot["Haiku_team"]["states"]
game = discord.Game("Khu Wibu")

activity = discord.Activity(
type=discord.ActivityType.playing,
name="Khu Wibu",
name= state,
details="Playing in the Misty Woods",
assets={
'large_image': 'catlove',
Expand All @@ -59,8 +65,6 @@ async def on_ready():
for guild in clients.guilds:
print(f' - {guild.name} (ID: {guild.id})')

await individual.SendOwner(clients) # **/ignore


#load file cogs
async def load_cogs():
Expand Down Expand Up @@ -265,4 +269,4 @@ async def log_memory_usage(interaction: discord.Interaction):
mem_info = process.memory_info()
await interaction.response.send_message(f"RSS: {mem_info.rss / 1024 / 1024:.2f} MB")

clients.run(config.TOKEN_TEST_BOT)
clients.run(config.TOKEN_HAIKU) # **/ignore

0 comments on commit 0de4484

Please sign in to comment.