feat: Add complete bot source code for v0.0.2
Introduces new cog modules for bump, debug, setup, and other functionalities. Implements core abstractions for database, embeds, file handling, and async utilities. Updates configuration and requirements for enhanced bot capabilities.
This commit is contained in:
7
src/ver/0.0.2/data/config.yml
Normal file
7
src/ver/0.0.2/data/config.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
managers:
|
||||
- USERID
|
||||
prefix: '!!'
|
||||
token: ""
|
||||
version: '0.2'
|
||||
mongo: "mongodb://HOST:PORT/DATABASE"
|
||||
bot_name: "kBump"
|
||||
73
src/ver/0.0.2/data/help.py
Normal file
73
src/ver/0.0.2/data/help.py
Normal file
@@ -0,0 +1,73 @@
|
||||
# /cogs/help.py
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
class Help(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.command(name="cmds", aliases=["cmd", "commands"])
|
||||
async def cmds(self, ctx: commands.Context):
|
||||
"""Displays a list of all available commands."""
|
||||
|
||||
# Get the prefix dynamically for the current server
|
||||
prefix = ctx.prefix
|
||||
|
||||
# Create the initial embed
|
||||
embed = discord.Embed(
|
||||
title="🤖 Bot Commands",
|
||||
description=f"Here is a list of commands you can use. The prefix for this server is `{prefix}`.",
|
||||
color=discord.Color.blurple()
|
||||
)
|
||||
|
||||
# Add a field for each command
|
||||
embed.add_field(
|
||||
name=f"{prefix}setup",
|
||||
value="Starts the interactive setup process to list your server.",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name=f"{prefix}bump",
|
||||
value="Bumps your server, sending its listing to the bump channel.",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name=f"{prefix}edit <subcommand> <value>",
|
||||
value="Edits a specific part of your server's setup.\n**Subcommands:** `desc`, `welcome`, `bumpchannel`, `color`, `tags`",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name=f"{prefix}setprefix <new_prefix>",
|
||||
value="Changes the bot's prefix for this server. Resets to default if no prefix is given.",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name=f"{prefix}sync",
|
||||
value="Manually syncs your server's name, icon, and tags with the database.",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name=f"{prefix}info",
|
||||
value="Displays information about your server's listing.",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name=f"{prefix}delete",
|
||||
value="Removes your server from the database and listing.",
|
||||
inline=False
|
||||
)
|
||||
embed.add_field(
|
||||
name="Utility Commands",
|
||||
value=f"`{prefix}ping` - Checks the bot's latency.\n`{prefix}avatar` - Shows a user's avatar.",
|
||||
inline=False
|
||||
)
|
||||
|
||||
embed.set_footer(text=f"Requested by {ctx.author.display_name}", icon_url=ctx.author.display_avatar.url)
|
||||
embed.timestamp = discord.utils.utcnow()
|
||||
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Help(bot))
|
||||
2
src/ver/0.0.2/data/motd.txt
Normal file
2
src/ver/0.0.2/data/motd.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
This is a Message of the Day!
|
||||
This will appear after the bump message IF "show_motd" is set to true in settings.json!
|
||||
7
src/ver/0.0.2/data/settings.json
Normal file
7
src/ver/0.0.2/data/settings.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"cooldown": 3600,
|
||||
"show_motd": true,
|
||||
"show_motd_wait": 10,
|
||||
"enable_serverlist": true,
|
||||
"serverlist_url": "https://servers.kitsunic.org/"
|
||||
}
|
||||
Reference in New Issue
Block a user