Compare commits

..

5 Commits
dev ... main

Author SHA1 Message Date
supopur 785e82a97f Merge branch 'dev' 2 years ago
supopur e1ce24d788 Forgot to import OS 2 years ago
supopur 95e06cca88 Merge branch 'main' of https://git.nazev.eu:8443/MEE2_Official_plugins/Essentials 2 years ago
supopur e7f42313b6 Added a reputation system. How to use:
+rep @usermention You are a good guy!
-rep @usermention You are a bad guy and i dont like you!
/reputation {user}
2 years ago
Qemlokriu a32dc53df4 typo 2 years ago

@ -17,13 +17,10 @@ Mee2 Essentials Cog is an official cog for the Mee2 Discord bot. This cog contai
- `/unlock`: Unlocks the channel where the command was used.
- `/lockdown`: Locks the whole server down so the default role can't type in any channel.
- `/unlockdown`: Unlocks the whole server so the default role can type where they could before
- `/reputation [member]`: Shows the reputation of a member.
- `+rep [member_mention] [optional_comment]`: Adds positive to a member.
- `-rep [member_mention] [optional_comment]`: Adds negative reputation to a member.
## Installation
1. Clone the repository or download the code as a ZIP file and extract it.
2. Copy the essentials folder to your Mee2 bot's cogs folder
3. Add essentials to your bot's config.toml file under the cogs list example: cogs=["cogs.example","cogs.essentials.commands"]
3. Add essentials to your bot's config.toml file under the cogs list example: cogs=["cogs.example","cogs.Essentials.commands"]

@ -23,6 +23,8 @@ else:
with open("cogs/essentials/config.toml", "r") as f:
esconf = toml.load(f)
class EssentialCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@ -108,7 +110,7 @@ class EssentialCommands(commands.Cog):
embed = discord.Embed(description=f"You have given {reputation_type} reputation to {user.mention} with the comment: {comment}", title="You have given reputation.")
await message.channel.send(embed=embed)
@commands.slash_command(guild_ids=guild_ids)
@commands.slash_command()
async def reputation(self, ctx, user: discord.User):
# load the reputation data from the TOML file
try:
@ -155,7 +157,6 @@ class EssentialCommands(commands.Cog):
return 0
await ctx.respond('Pong!')
@commands.slash_command(guild_ids=guild_ids)
@option('msg', description="The message to say.")
async def say(self, ctx, message):
@ -321,7 +322,7 @@ class EssentialCommands(commands.Cog):
atr = getattr(discord.Color, color)
embed.color = atr()
except Exception as e:
self.bot.api.logger("inf", f"Command ivoked a error wrong color: {e}")
bot.api.logger("inf", f"Command ivoked a error wrong color: {e}")
ctx.send("ERR: Invalid color.")
return 1
if footer:

Loading…
Cancel
Save