Moved generate embed function into settings.py

pull/8/head
sgoudham 4 years ago
parent 6676161a5f
commit fe388d622a

@ -10,16 +10,7 @@ from discord import File
from discord.ext.commands import has_permissions, Cog, group, bot_has_permissions from discord.ext.commands import has_permissions, Cog, group, bot_has_permissions
from settings import enso_embedmod_colours, blank_space, storage_modlog_for_guild, remove_modlog_channel, \ from settings import enso_embedmod_colours, blank_space, storage_modlog_for_guild, remove_modlog_channel, \
get_modlog_for_guild, get_roles_persist, update_role_persist get_modlog_for_guild, get_roles_persist, update_role_persist, generate_embed
async def generate_embed(ctx, desc):
"""Generate New Error Embed"""
embed = Embed(description=desc,
colour=enso_embedmod_colours)
await ctx.send(embed=embed)
# Method to ask the user if they want to be anonymous or not # Method to ask the user if they want to be anonymous or not

@ -1,6 +1,6 @@
import random import random
from discord import Colour from discord import Colour, Embed
# Defining a list of colours # Defining a list of colours
@ -79,6 +79,11 @@ def del_cache(guildid):
del enso_cache[guildid] del enso_cache[guildid]
# --------------------------------------------!End Cache Section!-------------------------------------------------------
# --------------------------------------------!RolePersist Section!-----------------------------------------------------
def get_roles_persist(guildid): def get_roles_persist(guildid):
"""Returning rolespersist value of the guild""" """Returning rolespersist value of the guild"""
@ -102,7 +107,7 @@ async def update_role_persist(guildid, value, pool):
await conn.commit() await conn.commit()
# --------------------------------------------!End Cache Section!------------------------------------------------------- # --------------------------------------------!End RolePersist Section!-------------------------------------------------
# --------------------------------------------!ModLogs Section!--------------------------------------------------------- # --------------------------------------------!ModLogs Section!---------------------------------------------------------
@ -243,6 +248,15 @@ def extensions():
return ext return ext
async def generate_embed(ctx, desc):
"""Generate Embed"""
embed = Embed(description=desc,
colour=enso_embedmod_colours)
await ctx.send(embed=embed)
async def storeRoles(pool, target, ctx, member): async def storeRoles(pool, target, ctx, member):
"""Storing User Roles within Database""" """Storing User Roles within Database"""

Loading…
Cancel
Save