me irl
judev1 / fbot Goto Github PK
View Code? Open in Web Editor NEWThe most annoying bot on Discord
Home Page: https://fbot.breadhub.uk
License: Other
The most annoying bot on Discord
Home Page: https://fbot.breadhub.uk
License: Other
Is your feature request related to a problem? Please describe.
Your error handler is just kinda bad. If a user is spamming a command, your error handler will spam too.
You're also not instancing the error, you're checking the types which is kinda weird and really unheard of.
Heres the code you should use, as well as the create embed part since embeds are nice and easier to ratelimit:
class Errorhandler(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.errorlogs = bot.get_channel(743392645228920882)
self.message_cooldown = commands.CooldownMapping.from_cooldown(
1.0, 3.0, commands.BucketType.user)
async def create_embed(self, ctx, error):
embed = discord.Embed(title=f"Error Caught!",
color=discord.Colour.red(), description=f"{error}")
embed.set_thumbnail(
url=self.bot.user.avatar_url_as(static_format="png"))
bucket = self.message_cooldown.get_bucket(ctx.message)
retry_after = bucket.update_rate_limit()
if retry_after:
return
else:
try:
await ctx.send(embed=embed, delete_after=5)
await ctx.message.add_reaction('\u274C')
except:
await ctx.send(f"`{error}`\n***Enable Embed permissions please.***", delete_after=5)
await ctx.message.add_reaction('\u274C')
return
@commands.Cog.listener()
async def on_command_error(self, ctx, error):
error = getattr(error, "original", error)
if hasattr(ctx.command, "on_error"):
return
else:
pass
if isinstance(error, errors.MissingRequiredArgument) or isinstance(error, errors.BadArgument):
helper = str(ctx.invoked_subcommand) if ctx.invoked_subcommand else str(
ctx.command)
await ctx.send_help(helper)
await self.create_embed(ctx, error)
elif isinstance(error, errors.CommandInvokeError):
error = default.traceback_maker(error.original)
if "2000 or fewer" in str(error) and len(ctx.message.clean_content) > 1900:
return await ctx.send(
"You attempted to make the command display more than 2,000 characters...\n"
"Both error and command will be ignored."
)
await ctx.send(f"There was an error processing the command\n{error}")
elif isinstance(error, errors.BotMissingPermissions):
await self.create_embed(ctx, error)
Describe the bug
In the help command the Support Us Link uses fn.server instead of a patreon link function
To Reproduce
Look at the code 4Head
Expected behaviour
Links to Patreon.
Describe the bug
After using fbot respects ScreaMyho Doupě
, it creates new message with reaction on it.
When I react with regional_indicator_f
under short period of time, it sends message who payed respects.
After some time this feature will stop working
To Reproduce
fbot respects test
Expected behaviour
react and bot responds with who reacted
Screenshots
No messages after reacting
Additional context
This can be fixed with using on_raw_message_add()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.