geas-bot/app/dev_cogs/events/on_guild_join.py
Vivek Santayana b0b417a8d2 15 July Nightly Commit
Split cogs into different files
About to change file structuring to move dev file to main file
2021-07-15 22:54:09 +01:00

22 lines
769 B
Python

import yaml # YAML parser for Bot config files
import asyncio # Discord Py Dependency
import discord # Main Lib
from discord.ext import commands # Commands module
from discord_slash import SlashCommand, SlashContext, cog_ext, utils # Slash Command Library
from discord_slash.utils.manage_commands import create_choice, create_option # Slash Command features
import logging
# logger and handler
from dev import configFile, setConfig, yaml_load, yaml_dump
#### Actions for the bot to take when the Bot joins a guild.
class on_guild_join(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_guild_join(self, guild):
setConfig(guild)
def setup(client):
client.add_cog(on_guild_join(client))