def SetIntents(IntObj: discord.Intents, IntL): for intent in IntL: if intent == "guilds": IntObj.guilds = True elif intent == "members": IntObj.members = True elif intent == "bans": IntObj.bans = True elif intent == "emojis": IntObj.emojis = True elif intent == "integrations": IntObj.integrations = True elif intent == "webhooks": IntObj.webhooks = True elif intent == "invites": IntObj.invites = True elif intent == "voice_states": IntObj.voice_states = True elif intent == "presences": IntObj.presences = True elif intent == "messages": IntObj.messages = True elif intent == "guild_messages": IntObj.guild_messages = True elif intent == "dm_messages": IntObj.dm_messages = True elif intent == "reactions": IntObj.reactions = True elif intent == "guild_reactions": IntObj.guild_reactions = True elif intent == "dm_reactions": IntObj.dm_reactions = True elif intent == "typing": IntObj.typing = True elif intent == "guild_typing": IntObj.guild_typing = True elif intent == "dm_typing": IntObj.dm_typing = True return IntObj
from discord import Member, Guild, Message, Intents from discord.ext.commands import Context, Bot, DefaultHelpCommand from .core.bunk_user import BunkUser from .core.cog_loader import get_cogs from .core.event_hook import EventHook from .core.functions import simple_string INTENTS = Intents().default() INTENTS.members = True INTENTS.presences = True BOT_DESCRIPTION = """ The bunkest bot - type '!help' for my commands, or say my name to chat with me. Type '!help [command] for more info on a command (i.e. !help color)\n """ class BunkBot(Bot): """ Main extended bot from discord.py which is the primary loaded instance from main.py The primary use for this bot is essentially an event emitter to the services which use this instance Attributes ----------- on_initialized: EventHook