Compare commits
38 Commits
master
...
bangame-de
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9d6ff768f1 | ||
![]() |
2dfb757fbd | ||
![]() |
b9da8246e1 | ||
![]() |
9b266c18be | ||
![]() |
3389fe2b0f | ||
![]() |
7470af525c | ||
![]() |
6d8e1a668e | ||
![]() |
0ff00e1deb | ||
![]() |
a665c5f827 | ||
![]() |
f538b6da53 | ||
![]() |
c470bec50a | ||
![]() |
59c9ea775b | ||
![]() |
495a5d0643 | ||
![]() |
8cbaab2815 | ||
![]() |
8786156963 | ||
![]() |
e1569ab7cf | ||
![]() |
afbfb0d49e | ||
![]() |
3c2c58dcd7 | ||
![]() |
b6884634fe | ||
![]() |
12afa30df8 | ||
![]() |
dfedfb466b | ||
![]() |
9ab8fdce9c | ||
![]() |
ffb3e52072 | ||
![]() |
417eea4859 | ||
![]() |
1f756cf429 | ||
![]() |
db01c69da3 | ||
![]() |
3a70f7db5f | ||
![]() |
eb32d4afd1 | ||
![]() |
02b9517688 | ||
![]() |
58066b328f | ||
![]() |
dfccae00b5 | ||
![]() |
f3e3463aed | ||
![]() |
29fca5ee9b | ||
![]() |
a310394954 | ||
![]() |
f6bd695995 | ||
![]() |
e632827e4e | ||
![]() |
ba506695cc | ||
![]() |
0080d22160 |
@ -140,7 +140,7 @@ class AnnounceDaily(Cog):
|
||||
@_ad.command()
|
||||
async def listimg(self, ctx: commands.Context):
|
||||
"""
|
||||
List all registered announcement immages
|
||||
List all registered announcement images
|
||||
"""
|
||||
images = await self.config.images()
|
||||
for page in pagify("\n".join(images)):
|
||||
@ -192,7 +192,7 @@ class AnnounceDaily(Cog):
|
||||
await self.config.time.set({"hour": h, "minute": m, "second": s})
|
||||
|
||||
await ctx.send(
|
||||
"Announcements time has been set to {}::{}::{} every day\n"
|
||||
"Announcement time has been set to {}::{}::{} every day\n"
|
||||
"**Changes will apply after next scheduled announcement or reload**".format(h, m, s)
|
||||
)
|
||||
|
||||
@ -229,7 +229,7 @@ class AnnounceDaily(Cog):
|
||||
await channel.send(choice)
|
||||
|
||||
async def check_day(self):
|
||||
while self is self.bot.get_cog("AnnounceDaily"):
|
||||
while True:
|
||||
tomorrow = datetime.now() + timedelta(days=1)
|
||||
time = await self.config.time()
|
||||
h, m, s = time["hour"], time["minute"], time["second"]
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Send daily announcements to all servers at a specified times",
|
||||
"hidden": true,
|
||||
"install_msg": "Thank you for installing AnnounceDaily! Get started with `[p]load announcedaily` and `[p]help AnnounceDaily`",
|
||||
"requirements": [],
|
||||
"short": "Send daily announcements",
|
||||
"tags": [
|
||||
"bobloy"
|
||||
|
@ -17,8 +17,8 @@ from .audiosession import AudioSession
|
||||
|
||||
class AudioTrivia(Trivia):
|
||||
"""
|
||||
Custom commands
|
||||
Creates commands used to display text and adjust roles
|
||||
Upgrade to the Trivia cog that enables audio trivia
|
||||
Replaces the Trivia cog
|
||||
"""
|
||||
|
||||
def __init__(self, bot: Red):
|
||||
@ -90,10 +90,16 @@ class AudioTrivia(Trivia):
|
||||
return
|
||||
|
||||
status = await self.audio.config.status()
|
||||
notify = await self.audio.config.notify()
|
||||
|
||||
if status:
|
||||
await ctx.send(
|
||||
"I recommend disabling audio status with `{}audioset status`".format(ctx.prefix)
|
||||
"It is recommended to disable audio status with `{}audioset status`".format(ctx.prefix)
|
||||
)
|
||||
|
||||
if notify:
|
||||
await ctx.send(
|
||||
"It is recommended to disable audio notify with `{}audioset notify`".format(ctx.prefix)
|
||||
)
|
||||
|
||||
if not self.audio._player_check(ctx):
|
||||
@ -110,7 +116,6 @@ class AudioTrivia(Trivia):
|
||||
|
||||
lavaplayer = lavalink.get_player(ctx.guild.id)
|
||||
lavaplayer.store("channel", ctx.channel.id) # What's this for? I dunno
|
||||
lavaplayer.store("guild", ctx.guild.id)
|
||||
|
||||
await self.audio._data_check(ctx)
|
||||
|
||||
|
@ -10,11 +10,11 @@
|
||||
"description": "Start an Audio Trivia game",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing Audio trivia!\n You **MUST** unload trivia to use this (`[p]unload trivia`)\n Then you can get started with `[p]load audiotrivia` and `[p]help AudioTrivia`",
|
||||
"requirements": [],
|
||||
"short": "Start an Audio Trivia game",
|
||||
"tags": [
|
||||
"fox",
|
||||
"bobloy",
|
||||
"games"
|
||||
"games",
|
||||
"audio"
|
||||
]
|
||||
}
|
5
bangame/__init__.py
Normal file
5
bangame/__init__.py
Normal file
@ -0,0 +1,5 @@
|
||||
from .bangame import BanGame
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(BanGame(bot))
|
117
bangame/bangame.py
Normal file
117
bangame/bangame.py
Normal file
@ -0,0 +1,117 @@
|
||||
import asyncio
|
||||
|
||||
import discord
|
||||
from redbot.core import Config, checks, commands
|
||||
from typing import Any
|
||||
|
||||
Cog: Any = getattr(commands, "Cog", object)
|
||||
|
||||
|
||||
class BanGame(Cog):
|
||||
"""
|
||||
Ban anyone playing the chosen games
|
||||
"""
|
||||
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, identifier=66971107197109101)
|
||||
default_guild = {"banned_games": [], "do_ban": False}
|
||||
|
||||
self.config.register_guild(**default_guild)
|
||||
|
||||
@commands.guild_only()
|
||||
@commands.group(aliases=["exclusiverole"])
|
||||
async def bangame(self, ctx):
|
||||
"""Base command for managing exclusive roles"""
|
||||
|
||||
if not ctx.invoked_subcommand:
|
||||
pass
|
||||
|
||||
@bangame.command(name="toggleban")
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def bangame_toggleban(self, ctx):
|
||||
"""Toggles kicking and banning"""
|
||||
|
||||
do_ban = not self.config.guild(ctx.guild).do_ban()
|
||||
await self.config.guild(ctx.guild).do_ban.set(do_ban)
|
||||
|
||||
await ctx.send(
|
||||
"Members will now be {} for playing a banned game".format(
|
||||
"Banned" if do_ban else "Kicked"
|
||||
)
|
||||
)
|
||||
|
||||
@bangame.command(name="add")
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def bangame_add(self, ctx, game):
|
||||
"""Adds a banned game"""
|
||||
if game in (await self.config.guild(ctx.guild).banned_games()):
|
||||
await ctx.send("That game is already banned")
|
||||
return
|
||||
|
||||
async with self.config.guild(ctx.guild).banned_games() as bg:
|
||||
bg.append(game)
|
||||
|
||||
await self.check_guild(ctx.guild)
|
||||
|
||||
await ctx.send("Banned game added: {}".format(game))
|
||||
|
||||
@bangame.command(name="delete")
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def bangame_delete(self, ctx, game):
|
||||
"""Deletes a banned game"""
|
||||
if game not in (await self.config.guild(ctx.guild).banned_games()):
|
||||
await ctx.send("That game is not banned")
|
||||
return
|
||||
|
||||
async with self.config.guild(ctx.guild).banned_games() as bg:
|
||||
bg.remove(game)
|
||||
|
||||
await ctx.send("{} is no longer banned".format(game))
|
||||
|
||||
@bangame.command(name="list")
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def bangame_list(self, ctx):
|
||||
"""List current banned games"""
|
||||
banned_games = await self.config.guild(ctx.guild).banned_games()
|
||||
|
||||
out = "**Banned Games**\n\n"
|
||||
|
||||
for game in banned_games:
|
||||
out += "{}\n".format(game)
|
||||
|
||||
await ctx.send(out)
|
||||
|
||||
async def check_guild(self, guild: discord.Guild):
|
||||
game_set = set(await self.config.guild(guild).banned_games())
|
||||
for member in guild.members:
|
||||
try:
|
||||
await self.ban_or_kick_banned_games(member, game_set=game_set)
|
||||
except discord.Forbidden:
|
||||
pass
|
||||
|
||||
async def ban_or_kick_banned_games(self, member: discord.Member, game_set=None):
|
||||
if game_set is None:
|
||||
game_set = set(await self.config.guild(member.guild).banned_games())
|
||||
|
||||
if member.activity is not None and member.activity.name in game_set:
|
||||
do_ban = await self.config.guild(member.guild).do_ban()
|
||||
|
||||
if do_ban:
|
||||
await member.ban(reason="Plays {}".format(member.activity.name))
|
||||
else:
|
||||
await member.kick(reason="Plays {}".format(member.activity.name))
|
||||
|
||||
async def on_member_update(self, before: discord.Member, after: discord.Member):
|
||||
if before.activity == after.activity:
|
||||
return
|
||||
|
||||
await asyncio.sleep(1)
|
||||
|
||||
game_set = set(await self.config.guild(after.guild).banned_games())
|
||||
|
||||
if after.activity is not None and after.activity.name in game_set:
|
||||
try:
|
||||
await self.ban_or_kick_banned_games(after, game_set=game_set)
|
||||
except discord.Forbidden:
|
||||
pass
|
20
bangame/info.json
Normal file
20
bangame/info.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"author": [
|
||||
"Bobloy"
|
||||
],
|
||||
"bot_version": [
|
||||
3,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"description": "Kick or ban members that play a banned game",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing BanGame. Get started with `[p]load bangame` and `[p]help BanGame`",
|
||||
"short": "Ban games",
|
||||
"tags": [
|
||||
"fox",
|
||||
"bobloy",
|
||||
"utility",
|
||||
"tools"
|
||||
]
|
||||
}
|
@ -116,7 +116,7 @@ class CCRole(Cog):
|
||||
|
||||
# Selfrole
|
||||
await ctx.send(
|
||||
"Is this a targeted command?(yes//no)\nNo will make this a selfrole command"
|
||||
"Is this a targeted command?(yes/no)\nNo will make this a selfrole command"
|
||||
)
|
||||
|
||||
try:
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "[Incomplete] Creates custom commands to adjust roles and send custom messages",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing Custom Commands w/ Roles. Get started with `[p]load ccrole` and `[p]help CCRole`",
|
||||
"requirements": [],
|
||||
"short": "[Incomplete] Creates commands that adjust roles",
|
||||
"tags": [
|
||||
"fox",
|
||||
|
@ -152,6 +152,10 @@ class Chatter(Cog):
|
||||
Trains the bot based on language in this guild
|
||||
"""
|
||||
|
||||
await ctx.send("Warning: The cog may use significant RAM or CPU if trained on large data sets.\n"
|
||||
"Additionally, large sets will use more disk space to save the trained data.\n\n"
|
||||
"If you experience issues, clear your trained data and train again on a smaller scope.")
|
||||
|
||||
conversation = await self._get_conversation(ctx, channel)
|
||||
|
||||
if not conversation:
|
||||
|
@ -10,7 +10,7 @@
|
||||
"description": "Lint python code posted in chat",
|
||||
"hidden": true,
|
||||
"install_msg": "Thank you for installing CogLint! Get started with `[p]load coglint` and `[p]help CogLint`",
|
||||
"requirements": [],
|
||||
"requirements": ["pylint"],
|
||||
"short": "Python cog linter",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -28,7 +28,7 @@ class Dad(Cog):
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, identifier=6897100, force_registration=True)
|
||||
|
||||
default_guild = {"enabled": False, "nickname": False, "cooldown": 240}
|
||||
default_guild = {"enabled": True, "nickname": False, "cooldown": 240}
|
||||
|
||||
self.config.register_guild(**default_guild)
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Tell dad jokes and give out bad nicknames",
|
||||
"hidden": true,
|
||||
"install_msg": "Thank you for installing Dad. Get started with `[p]load dad`, then `[p]help Dad`",
|
||||
"requirements": [],
|
||||
"short": "Dad joke bot",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -19,7 +19,8 @@ class ExclusiveRole(Cog):
|
||||
|
||||
self.config.register_guild(**default_guild)
|
||||
|
||||
@commands.group(no_pm=True, aliases=["exclusiverole"])
|
||||
@commands.guild_only()
|
||||
@commands.group(aliases=["exclusiverole"])
|
||||
async def exclusive(self, ctx):
|
||||
"""Base command for managing exclusive roles"""
|
||||
|
||||
@ -54,6 +55,21 @@ class ExclusiveRole(Cog):
|
||||
|
||||
await ctx.send("Exclusive role removed")
|
||||
|
||||
@exclusive.command(name="list")
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def exclusive_list(self, ctx):
|
||||
"""List current exclusive roles"""
|
||||
role_list = await self.config.guild(ctx.guild).role_list()
|
||||
guild: discord.Guild = ctx.guild
|
||||
|
||||
role_list = [guild.get_role(role_id) for role_id in role_list]
|
||||
out = "**Exclusive roles**\n\n"
|
||||
|
||||
for role in role_list:
|
||||
out += "{}\n".format(role)
|
||||
|
||||
await ctx.send(out)
|
||||
|
||||
async def check_guild(self, guild: discord.Guild):
|
||||
role_set = set(await self.config.guild(guild).role_list())
|
||||
for member in guild.members:
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Assign roles to be exclusive, preventing other roles from being added",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing ExclusiveRole. Get started with `[p]load exclusiverole` and `[p]help ExclusiveRole`",
|
||||
"requirements": [],
|
||||
"short": "Set roles to be exclusive",
|
||||
"tags": [
|
||||
"fox",
|
||||
|
20
flag/flag.py
20
flag/flag.py
@ -72,25 +72,22 @@ class Flag(Cog):
|
||||
"""Flag a member"""
|
||||
guild = ctx.guild
|
||||
await self._check_flags(guild)
|
||||
# clashroyale = self.bot.get_cog('clashroyale')
|
||||
# if clashroyale is None:
|
||||
# await ctx.send("Requires clashroyale cog installed")
|
||||
# return
|
||||
|
||||
flag = self._flag_template()
|
||||
expiredate = date.today()
|
||||
expiredate += timedelta(days=await self.config.guild(guild).days())
|
||||
expire_date = date.today() + timedelta(days=await self.config.guild(guild).days())
|
||||
|
||||
flag["reason"] = reason
|
||||
flag["expireyear"] = expiredate.year
|
||||
flag["expiremonth"] = expiredate.month
|
||||
flag["expireday"] = expiredate.day
|
||||
flag["expireyear"] = expire_date.year
|
||||
flag["expiremonth"] = expire_date.month
|
||||
flag["expireday"] = expire_date.day
|
||||
|
||||
# flags = await self.config.guild(guild).flags.get_raw(str(member.id), default=[])
|
||||
# flags.append(flag)
|
||||
# await self.config.guild(guild).flags.set_raw(str(member.id), value=flags)
|
||||
|
||||
async with self.config.guild(guild).flags() as flags:
|
||||
if str(member.id) not in flags:
|
||||
flags[str(member.id)] = []
|
||||
flags[str(member.id)].append(flag)
|
||||
|
||||
outembed = await self._list_flags(member)
|
||||
@ -98,7 +95,10 @@ class Flag(Cog):
|
||||
if outembed:
|
||||
await ctx.send(embed=outembed)
|
||||
if await self.config.guild(guild).dm():
|
||||
await member.send(embed=outembed)
|
||||
try:
|
||||
await member.send(embed=outembed)
|
||||
except discord.Forbidden:
|
||||
await ctx.send("DM-ing user failed")
|
||||
else:
|
||||
await ctx.send("This member has no flags.. somehow..")
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Add expiring flags on members to track warnings or incidents",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing Flag! Get started with `[p]load flag` and `[p]help Flag`",
|
||||
"requirements": [],
|
||||
"short": "Add expiring flags to members",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Mentions roles that are unmentionable",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing ForceMention! Get started with `[p]load forcemention`, then `[p]forcemention`",
|
||||
"requirements": [],
|
||||
"short": "Mention unmentionables",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -137,21 +137,25 @@ class Hangman(Cog):
|
||||
HANGMAN""",
|
||||
)
|
||||
|
||||
@commands.group(aliases=["sethang"], pass_context=True)
|
||||
@commands.group(aliases=["sethang"])
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def hangset(self, ctx):
|
||||
"""Adjust hangman settings"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
pass
|
||||
|
||||
@hangset.command(pass_context=True)
|
||||
@hangset.command()
|
||||
async def face(self, ctx: commands.Context, theface):
|
||||
"""Set the face of the hangman"""
|
||||
message = ctx.message
|
||||
# Borrowing FlapJack's emoji validation
|
||||
# (https://github.com/flapjax/FlapJack-Cogs/blob/master/smartreact/smartreact.py)
|
||||
if theface[:2] == "<:":
|
||||
theface = [r for r in self.bot.emojis if r.id == theface.split(":")[2][:-1]][0]
|
||||
theface = self.bot.get_emoji(int(theface.split(":")[2][:-1]))
|
||||
|
||||
if theface is None:
|
||||
await ctx.send("I could not find that emoji")
|
||||
return
|
||||
|
||||
try:
|
||||
# Use the face as reaction to see if it's valid (THANKS FLAPJACK <3)
|
||||
@ -160,11 +164,11 @@ class Hangman(Cog):
|
||||
await ctx.send("That's not an emoji I recognize.")
|
||||
return
|
||||
|
||||
await self.config.guild(ctx.guild).theface.set(theface)
|
||||
await self.config.guild(ctx.guild).theface.set(str(theface))
|
||||
await self._update_hanglist()
|
||||
await ctx.send("Face has been updated!")
|
||||
|
||||
@hangset.command(pass_context=True)
|
||||
@hangset.command()
|
||||
async def toggleemoji(self, ctx: commands.Context):
|
||||
"""Toggles whether to automatically react with the alphabet"""
|
||||
|
||||
@ -172,7 +176,7 @@ class Hangman(Cog):
|
||||
await self.config.guild(ctx.guild).emojis.set(not current)
|
||||
await ctx.send("Emoji Letter reactions have been set to {}".format(not current))
|
||||
|
||||
@commands.command(aliases=["hang"], pass_context=True)
|
||||
@commands.command(aliases=["hang"])
|
||||
async def hangman(self, ctx, guess: str = None):
|
||||
"""Play a game of hangman against the bot!"""
|
||||
if guess is None:
|
||||
@ -339,11 +343,14 @@ class Hangman(Cog):
|
||||
|
||||
await message.add_reaction(self.navigate[0])
|
||||
|
||||
def _make_say(self, guild):
|
||||
async def _make_say(self, guild):
|
||||
c_say = "Guess this: " + str(self._hideanswer(guild)) + "\n"
|
||||
c_say += "Used Letters: " + str(self._guesslist(guild)) + "\n"
|
||||
c_say += self.hanglist[guild][self.the_data[guild]["hangman"]] + "\n"
|
||||
c_say += self.navigate[0] + " for A-M, " + self.navigate[-1] + " for N-Z"
|
||||
if await self.config.guild(guild).emojis():
|
||||
c_say += "{} for A-M, {} for N-Z".format(self.navigate[0], self.navigate[-1])
|
||||
else:
|
||||
c_say += "React with {} - {} to guess".format(self.letters[0], self.letters[-1])
|
||||
|
||||
return c_say
|
||||
|
||||
@ -351,7 +358,7 @@ class Hangman(Cog):
|
||||
if message.guild not in self.hanglist:
|
||||
await self._update_hanglist()
|
||||
|
||||
c_say = self._make_say(message.guild)
|
||||
c_say = await self._make_say(message.guild)
|
||||
|
||||
await message.edit(content=c_say)
|
||||
self.the_data[message.guild]["trackmessage"] = message.id
|
||||
@ -363,7 +370,7 @@ class Hangman(Cog):
|
||||
if channel.guild not in self.hanglist:
|
||||
await self._update_hanglist()
|
||||
|
||||
c_say = self._make_say(channel.guild)
|
||||
c_say = await self._make_say(channel.guild)
|
||||
|
||||
message = await channel.send(c_say)
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Create a channel with updating server info",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing InfoChannel. Get started with `[p]load infochannel`, then `[p]help InfoChannel`",
|
||||
"requirements": [],
|
||||
"short": "Updating server info channel",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -10,7 +10,6 @@
|
||||
"description": "Keeps track of when people leave the server, and posts a message notifying",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing Leaver. Get started with `[p]load leaver`, then `[p]help Leaver`",
|
||||
"requirements": [],
|
||||
"short": "Send message on leave",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import discord
|
||||
|
||||
from redbot.core import Config, checks, commands
|
||||
from redbot.core.bot import Red
|
||||
from redbot.core.commands import Context
|
||||
from typing import Any
|
||||
|
||||
@ -12,7 +13,7 @@ class Leaver(Cog):
|
||||
Creates a goodbye message when people leave
|
||||
"""
|
||||
|
||||
def __init__(self, bot):
|
||||
def __init__(self, bot: Red):
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True)
|
||||
default_guild = {"channel": ""}
|
||||
@ -28,6 +29,7 @@ class Leaver(Cog):
|
||||
|
||||
@leaverset.command()
|
||||
async def channel(self, ctx: Context):
|
||||
"""Choose the channel to send leave messages to"""
|
||||
guild = ctx.guild
|
||||
await self.config.guild(guild).channel.set(ctx.channel.id)
|
||||
await ctx.send("Channel set to " + ctx.channel.name)
|
||||
@ -38,6 +40,10 @@ class Leaver(Cog):
|
||||
|
||||
if channel != "":
|
||||
channel = guild.get_channel(channel)
|
||||
await channel.send(str(member) + "(*" + str(member.nick) + "*) has left the server!")
|
||||
out = "{}{} has left the server".format(member, member.nick if member.nick is not None else "")
|
||||
if await self.bot.embed_requested(channel, member):
|
||||
await channel.send(embed=discord.Embed(description=out, color=self.bot.color))
|
||||
else:
|
||||
await channel.send(out)
|
||||
else:
|
||||
pass
|
||||
|
@ -14,7 +14,7 @@ Cog: Any = getattr(commands, "Cog", object)
|
||||
|
||||
class QRInvite(Cog):
|
||||
"""
|
||||
V3 Cog Template
|
||||
Create custom QR codes for server invites
|
||||
"""
|
||||
|
||||
def __init__(self, bot: Red):
|
||||
|
@ -1,10 +1,22 @@
|
||||
{
|
||||
"author" : ["Bobloy"],
|
||||
"bot_version" : [3,0,0],
|
||||
"description" : "Cog to prevent reactions on specific messages from certain users",
|
||||
"hidden" : true,
|
||||
"install_msg" : "Thank you for installing ReactRestrict.",
|
||||
"requirements" : [],
|
||||
"short" : "[Incomplete] Prevent reactions",
|
||||
"tags" : ["react", "reaction", "restrict", "tools", "utils", "bobloy"]
|
||||
"author": [
|
||||
"Bobloy"
|
||||
],
|
||||
"bot_version": [
|
||||
3,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"description": "Cog to prevent reactions on specific messages from certain users",
|
||||
"hidden": true,
|
||||
"install_msg": "Thank you for installing ReactRestrict.",
|
||||
"short": "[Incomplete] Prevent reactions",
|
||||
"tags": [
|
||||
"react",
|
||||
"reaction",
|
||||
"restrict",
|
||||
"tools",
|
||||
"utils",
|
||||
"bobloy"
|
||||
]
|
||||
}
|
@ -206,8 +206,7 @@ class ReactRestrict(Cog):
|
||||
@reactrestrict.command()
|
||||
async def add(self, ctx: commands.Context, message_id: int, *, role: discord.Role):
|
||||
"""
|
||||
Adds a reaction|role combination to a registered message, don't use
|
||||
quotes for the role name.
|
||||
Adds a reaction|role combination to a registered message, don't use quotes for the role name.
|
||||
"""
|
||||
message = await self._get_message(ctx, message_id)
|
||||
if message is None:
|
||||
|
@ -11,7 +11,6 @@
|
||||
"description": "Apply for a job at the recycling plant! Sort out the garbage!",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing RecyclingPlant. Start recycling today with `[p]load recyclingplant`, then `[p]recyclingplant`",
|
||||
"requirements": [],
|
||||
"short": "Apply for a job at the recycling plant!",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -81,7 +81,7 @@ class RecyclingPlant(Cog):
|
||||
)
|
||||
else:
|
||||
if reward > 0:
|
||||
bank.deposit_credits(ctx.author, reward)
|
||||
await bank.deposit_credits(ctx.author, reward)
|
||||
await ctx.send(
|
||||
"{} been given **{} {}s** for your services.".format(
|
||||
ctx.author.display_name, reward, bank.get_currency_name(ctx.guild)
|
||||
|
@ -10,7 +10,7 @@
|
||||
],
|
||||
"description": "Play Rock Papers Scissor Lizard Spock by Sam Kass in Discord!",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing RPSLP. Get started with `[p]load rpsls`, then `[p]rpsls`",
|
||||
"install_msg": "Thank you for installing RPSLS. Get started with `[p]load rpsls`, then `[p]rpsls`",
|
||||
"requirements": [],
|
||||
"short": "Play Rock Papers Scissor Lizard Spock in Discord!",
|
||||
"tags": [
|
||||
|
@ -9,7 +9,7 @@
|
||||
],
|
||||
"description": "Convert any website into text and post it in chat",
|
||||
"hidden": true,
|
||||
"install_msg": "Thank you for installing SayUrl! Get started with `[p]load forcemention`, then `[p]help SayUrl",
|
||||
"install_msg": "Thank you for installing SayUrl! Get started with `[p]load sayurl`, then `[p]help SayUrl",
|
||||
"requirements": ["html2text"],
|
||||
"short": "Convert URL to text",
|
||||
"tags": [
|
||||
|
@ -28,7 +28,7 @@ class SCP(Cog):
|
||||
msg = "You must specify a number between 1 and 4999."
|
||||
c = discord.Color.red()
|
||||
|
||||
if ctx.embed_requested():
|
||||
if await ctx.embed_requested():
|
||||
await ctx.send(embed=discord.Embed(description=msg, color=c))
|
||||
else:
|
||||
await ctx.maybe_send_embed(msg)
|
||||
@ -94,7 +94,7 @@ class SCP(Cog):
|
||||
|
||||
em = discord.Embed(title=ttl, description=msg, color=c)
|
||||
|
||||
if ctx.embed_requested():
|
||||
if await ctx.embed_requested():
|
||||
await ctx.send(embed=em)
|
||||
else:
|
||||
await ctx.maybe_send_embed(msg)
|
||||
@ -118,7 +118,7 @@ class SCP(Cog):
|
||||
|
||||
em = discord.Embed(title=ttl, description=msg, color=c)
|
||||
|
||||
if ctx.embed_requested():
|
||||
if await ctx.embed_requested():
|
||||
await ctx.send(embed=em)
|
||||
else:
|
||||
await ctx.maybe_send_embed(msg)
|
||||
|
@ -9,8 +9,7 @@
|
||||
],
|
||||
"description": "Apply roles based on the # of days on server",
|
||||
"hidden": false,
|
||||
"install_msg": "Thank you for installing timerole.\nGet started with `[p]load timerole`. Configure with [p]timerole",
|
||||
"requirements": [],
|
||||
"install_msg": "Thank you for installing timerole.\nGet started with `[p]load timerole`. Configure with `[p]timerole`",
|
||||
"short": "Apply roles after # of days",
|
||||
"tags": [
|
||||
"bobloy",
|
||||
|
@ -41,6 +41,11 @@ class Werewolf(Cog):
|
||||
|
||||
@commands.command()
|
||||
async def buildgame(self, ctx: commands.Context):
|
||||
"""
|
||||
Create game codes to run custom games.
|
||||
|
||||
Pick the roles or randomized roles you want to include in a game
|
||||
"""
|
||||
gb = GameBuilder()
|
||||
code = await gb.build_game(ctx)
|
||||
|
||||
@ -92,7 +97,7 @@ class Werewolf(Cog):
|
||||
|
||||
@commands.guild_only()
|
||||
@wwset.command(name="category")
|
||||
async def wwset_category(self, ctx: commands.Context, category_id=None):
|
||||
async def wwset_category(self, ctx: commands.Context, category_id: int=None):
|
||||
"""
|
||||
Assign the channel category
|
||||
"""
|
||||
@ -294,7 +299,7 @@ class Werewolf(Cog):
|
||||
Find custom roles by name, alignment, category, or ID
|
||||
"""
|
||||
if ctx.invoked_subcommand is None or ctx.invoked_subcommand == self.ww_search:
|
||||
await ctx.send_help()
|
||||
pass
|
||||
|
||||
@ww_search.command(name="name")
|
||||
async def ww_search_name(self, ctx: commands.Context, *, name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user