mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Updated readme, cleaned up code
This commit is contained in:
parent
bab4eb10f8
commit
d1db34a9c4
@ -1,12 +1,12 @@
|
||||
# Red - A fully customizable Discord bot
|
||||
#### *Music, admin, trivia, fun commands and much more!*
|
||||
[<img src="https://img.shields.io/badge/Support-me!-orange.svg">](https://www.patreon.com/Twentysix26) [<img src="https://img.shields.io/badge/discord-py-blue.svg">](https://github.com/Rapptz/discord.py) [<img src="https://discordapp.com/api/servers/133049272517001216/widget.png?style=banner5">](https://discord.gg/0k4npTwMvTpv9wrh)
|
||||
[<img src="https://img.shields.io/badge/Support-me!-orange.svg">](https://www.patreon.com/Twentysix26) [<img src="https://img.shields.io/badge/discord-py-blue.svg">](https://github.com/Rapptz/discord.py) [<img src="https://discordapp.com/api/guilds/133049272517001216/widget.png?style=banner5">](https://discord.gg/0k4npTwMvTpv9wrh)
|
||||
|
||||
Red is a fully modular bot which comes with sets of features/commands that can be enabled/disabled to your liking, making it customizable exactly how you want.
|
||||
You can turn Red into a trivia bot, an admin bot, a music bot (...) or all of these together.
|
||||
|
||||
The default set of modules includes and it's not limited to:
|
||||
* admin commands
|
||||
The default set of modules includes and it's not limited to:
|
||||
* admin commands
|
||||
* trivia (lists included and you can make new ones!)
|
||||
* music features (playlists, youtube, soundcloud, queues...)
|
||||
* stream alerts (twitch/hitbox)
|
||||
|
||||
@ -47,10 +47,10 @@ class General:
|
||||
"""
|
||||
author = ctx.message.author
|
||||
if number > 1:
|
||||
n = str(randint(1, number))
|
||||
return await self.bot.say("{} :game_die: {} :game_die:".format(author.mention, n))
|
||||
n = randint(1, number)
|
||||
await self.bot.say("{} :game_die: {} :game_die:".format(author.mention, n))
|
||||
else:
|
||||
return await self.bot.say("{} Maybe higher than 1? ;P".format(author.mention))
|
||||
await self.bot.say("{} Maybe higher than 1? ;P".format(author.mention))
|
||||
|
||||
@commands.command(pass_context=True)
|
||||
async def flip(self, ctx, user : discord.Member=None):
|
||||
@ -71,9 +71,9 @@ class General:
|
||||
tran = "∀qƆpƎℲפHIſʞ˥WNOԀQᴚS┴∩ΛMX⅄Z"
|
||||
table = str.maketrans(char, tran)
|
||||
name = name.translate(table)
|
||||
return await self.bot.say(msg + "(╯°□°)╯︵ " + name[::-1])
|
||||
await self.bot.say(msg + "(╯°□°)╯︵ " + name[::-1])
|
||||
else:
|
||||
return await self.bot.say("*flips a coin and... " + randchoice(["HEADS!*", "TAILS!*"]))
|
||||
await self.bot.say("*flips a coin and... " + randchoice(["HEADS!*", "TAILS!*"]))
|
||||
|
||||
@commands.command(pass_context=True)
|
||||
async def rps(self, ctx, choice : str):
|
||||
@ -108,16 +108,15 @@ class General:
|
||||
await self.bot.say("Choose rock, paper or scissors.")
|
||||
|
||||
@commands.command(name="8", aliases=["8ball"])
|
||||
async def _8ball(self, *question):
|
||||
async def _8ball(self, *, question : str):
|
||||
"""Ask 8 ball a question
|
||||
|
||||
Question must end with a question mark.
|
||||
"""
|
||||
question = " ".join(question)
|
||||
if question.endswith("?") and question != "?":
|
||||
return await self.bot.say("`" + randchoice(self.ball) + "`")
|
||||
await self.bot.say("`" + randchoice(self.ball) + "`")
|
||||
else:
|
||||
return await self.bot.say("That doesn't look like a question.")
|
||||
await self.bot.say("That doesn't look like a question.")
|
||||
|
||||
@commands.command(aliases=["sw"], pass_context=True)
|
||||
async def stopwatch(self, ctx):
|
||||
@ -129,7 +128,7 @@ class General:
|
||||
else:
|
||||
tmp = abs(self.stopwatches[author.id] - int(time.perf_counter()))
|
||||
tmp = str(datetime.timedelta(seconds=tmp))
|
||||
await self.bot.say(author.mention + " Stopwatch stopped! Time: **" + str(tmp) + "**")
|
||||
await self.bot.say(author.mention + " Stopwatch stopped! Time: **" + tmp + "**")
|
||||
self.stopwatches.pop(author.id, None)
|
||||
|
||||
@commands.command()
|
||||
|
||||
7
red.py
7
red.py
@ -21,9 +21,7 @@ import traceback
|
||||
# https://github.com/Rapptz/RoboDanny/tree/async
|
||||
#
|
||||
|
||||
description = """
|
||||
Red - A multifunction Discord bot by Twentysix
|
||||
"""
|
||||
description = "Red - A multifunction Discord bot by Twentysix"
|
||||
|
||||
formatter = commands.HelpFormatter(show_check_failure=False)
|
||||
|
||||
@ -32,8 +30,6 @@ bot = commands.Bot(command_prefix=["_"], formatter=formatter,
|
||||
|
||||
settings = Settings()
|
||||
|
||||
from cogs.utils import checks
|
||||
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
@ -367,7 +363,6 @@ def load_cogs():
|
||||
|
||||
def main():
|
||||
global settings
|
||||
global checks
|
||||
|
||||
check_folders()
|
||||
check_configs()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user