def setup(bot: Bot): bot.add_cog(Dev(bot))
from templatebot import Bot from discord import AllowedMentions, Activity, Game from os import environ as env from dotenv import load_dotenv import discord from discord.ext import fancyhelp bot = Bot( name="BakeryBot", command_prefix="b!", allowed_mentions=AllowedMentions(everyone=False, roles=False, users=True), help_command=fancyhelp.EmbeddedHelpCommand(color=0x4e5d94), activity=Game("with cakes ЁЯН░"), ) bot.VERSION = "1.0.0" bot.load_initial_cogs("cogs.bakery", "cogs.bake", "cogs.shop") @bot.event async def on_command_error(ctx, error): await ctx.send(f"ЁЯТе {error}") bot.run(env.get("TOKEN", None))
from templatebot import Bot from datetime import datetime from discord import Intents from src.utils.loader import load from src.utils.httpclient import ManagedHTTP config = load() bot = Bot(name="Soren", command_prefix=config.get("prefix", "~"), logging_url=config.get("logs", None), intents=Intents.all()) bot.started_at = datetime.utcnow() bot.config = config bot.httpclient = ManagedHTTP() bot.load_initial_cogs( "src.cogs.core", "src.cogs.embeds", "src.cogs.web", "src.cogs.random", ) bot.run(config.get("token"))
def setup(bot: Bot): bot.add_cog(Recipe(bot))
def setup(bot: Bot): bot.add_cog(Profile(bot))
from templatebot import Bot from discord import AllowedMentions, Activity, Game from os import environ as env from dotenv import load_dotenv import discord from discord.ext import fancyhelp bot = Bot( name="Coffee", command_prefix=";;", allowed_mentions=AllowedMentions(everyone=False, roles=False, users=True), help_command=fancyhelp.EmbeddedHelpCommand(color=0x2F3136), activity=Game("with logs 📝"), ) bot.VERSION = "2.0.0" bot.load_initial_cogs("cogs.logs", "cogs.mod", "cogs.setup", "cogs.top-gg") @bot.event async def on_command_error(ctx, error): await ctx.send(f"💥 {error}") # Lazy error_handling, will be changed soon! bot.run(env.get("TOKEN", None))
from templatebot import Bot from discord.ext import commands from discord import Embed, TextChannel, Game from datetime import datetime from os import getenv from dotenv import load_dotenv from utils.db import Database load_dotenv() bot = Bot(name="PinManager", command_prefix="p!", help_command=None, activity=Game(name="p!pins")) db = Database() @bot.group(name="pins") @commands.has_guild_permissions(manage_guild=True) async def pins(ctx: commands.Context): if not ctx.invoked_subcommand: await ctx.send( "Usage:\n`p!pins add <channel> <archive_channel>`\n`p!pins remove <channel>`" ) @pins.command(name="add", aliases=["set"]) async def pins_add(ctx: commands.Context, channel: TextChannel, archive: TextChannel): try:
from templatebot import Bot from discord import AllowedMentions, Activity, Game from os import environ as env from dotenv import load_dotenv from cogs.help import BakerHelp from utils.database import DatabaseInterface load_dotenv(".env") bot = Bot( name="BakerBot", command_prefix="b!", logging_url=env.get("WEBHOOK", None), allowed_mentions=AllowedMentions(everyone=False, roles=False, users=False, replied_user=True), help_command=BakerHelp(), activity=Game("with cupcakes"), ) bot.VERSION = "1.0.0" bot.db = DatabaseInterface() bot.load_initial_cogs("cogs.profile", "cogs.dev", "cogs.recipe", "cogs.utility", "cogs.help") bot.run(env.get("TOKEN", None))
def setup(bot: Bot): bot.add_cog(Default(bot))
from templatebot import Bot from discord import Intents from utils.config import ConfigLoader config = ConfigLoader() botconf = config.get("bot", {}) bot = Bot( name="ResearchBot", command_prefix=botconf.get("prefix", "!"), intents=Intents.all(), logging_url=botconf.get("webhook"), help_command=None, ) bot.cfg = config bot.load_initial_cogs("cogs.amp", "cogs.autopin", "cogs.links", "cogs.alerts", "cogs.issues") bot.run(botconf["token"])
if not message.guild: p = config.get("prefix", "!") else: gconf = await bot.db.get_guild_config(message.guild.id) if not gconf: p = config.get("prefix", "!") else: p = gconf["prefix"] return p # Create the bot itself bot = Bot( name="ToxBot", command_prefix=get_prefix, intents=intents, allowed_mentions=AllowedMentions(replied_user=False, roles=False), help_command=None, ) bot.VERSION = "V1.0.0-alpha" bot.ENV = config.get("env", "prod") bot.config = config bot.db = DatabaseInterface(config, load("static/default.yml")) bot.api = HTTPClient(config["msgsafe"]) bot.times = AverageQueue() # Load the cogs we need bot.load_initial_cogs( "cogs.ui", "cogs.detector", )
def setup(bot: Bot): bot.add_cog(Detector(bot))
from templatebot import Bot from discord import Intents from os import getenv from botconfig.client import BotConfig from discord.ext.commands import MinimalHelpCommand intents = Intents.none() intents.voice_states = True intents.messages = True intents.guilds = True bot = Bot( name="Airhorn Supremacy", command_prefix="ah!", intents=Intents.default(), logging_url=getenv("WEBHOOK"), help_command=MinimalHelpCommand(), ) bot.config = BotConfig(getenv("BOT_ID"), getenv("CONFIG_TOKEN")) bot.load_initial_cogs("cogs.airhorn", "cogs.config") bot.run(getenv("TOKEN"))
def setup(bot: Bot): bot.add_cog(Config(bot))
def setup(bot: Bot): bot.add_cog(UI(bot))
def setup(bot: Bot): bot.add_cog(Airhorn(bot))