I realized having to host this potentially indefinitely might not be the best idea, so I am going to shut down this gitea instance eventually.
You’ll have time, at least until the end of 2022, probably longer, but please just get all your stuff somewhere safe in case we ever disappear.
If any of your build scripts rely on my (kageru’s) projects hosted here, check my Github or IEW on Github for encoding projects. If you can’t find what you’re looking there, tell me to migrate it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.0 KiB

import discord
from discord.ext import commands
import sqlite3
import configloader
import random
import logging
from logging.handlers import RotatingFileHandler
logger = logging.getLogger('discord')
handler = RotatingFileHandler(filename='logs/bot.log', maxBytes=1024 * 5, backupCount=2, encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
__version__ = '0.0.1'
bot = commands.Bot(command_prefix=configloader.__prefix__)
def Database(db):
with sqlite3.connect(db) as con:
c = con.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS `users` (`name`,`id`, `platform`);''')
async def on_ready():
bot_app_info = await bot.application_info()
print(f"Owner: {bot_app_info.owner}")
print(f"Bot-Name: {bot.user.name}")
print(f"Bot-ID: {bot.user.id}")
print(f"Bot Version: {__version__}")
for cog in configloader.__cogs__:
print(f"{cog} loaded")
except Exception as err:
print(f"Couldn't load cog: {cog}")
raise err
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="Juicy developing."))
async def on_member_join(member):
bot_app_info = await bot.application_info()
emoji = [':wink:', ':wave:', ':tada:']
channel = bot.get_channel(int(configloader.__greet_channel__))
guild = member.guild
embed = configloader.embed.messageEmbed(f"Willkommen bei {guild.name} {random.choice(emoji)}",
f"{bot_app_info.owner}", f"{bot_app_info.icon_url}")
await channel.send(embed=embed)
if __name__ == "__main__":