Exemple #1
0
    async def shutdown(self, ctx):
        embed = discord.Embed(
            color=self.bot.embed_color,
            title="→ Shutdown",
            description="• Performing a shutdown on the bot... ( :wave: )")

        await ctx.send(embed=embed)
        await self.bot.logout()

        logger.info(f"Owner | Sent Shutdown: {ctx.author}")
Exemple #2
0
    async def name(self, ctx, name):
        await self.bot.user.edit(username=name)

        embed = discord.Embed(
            color=self.bot.embed_color,
            title="→ Bot Name Changed!",
            description=f"• My name has been updated to: `{name}`")

        await ctx.send(embed=embed)

        logger.info(f"Owner | Sent Name: {ctx.author} | Name: {name}")
Exemple #3
0
    async def update_news(self, ctx, *, news):
        self.bot.cursor.execute(
            "UPDATE bot_information SET NEWS = ? WHERE ROWID = 1", (news, ))
        self.bot.db.commit()

        embed = discord.Embed(color=self.bot.embed_color,
                              title="→ News Updated",
                              description=f"News is now set to: `{news}`")

        await ctx.send(embed=embed)

        logger.info(f"Owner | Sent Update News : {ctx.author}")
Exemple #4
0
    async def guilds(self, ctx):
        post = requests.post("https://hasteb.in/documents",
                             data=f"\n".join([
                                 guild.name for guild in self.bot.guilds
                             ]).encode("utf-8"))

        embed = discord.Embed(
            color=self.bot.embed_color,
            title=f"→ Current amount of Guilds",
            description=f"• Guilds: **https://hasteb.in/{post.json()['key']}**"
        )

        await ctx.send(embed=embed)

        logger.info(f"Owner | Sent guilds: {ctx.author}")
Exemple #5
0
    async def get_invite(self, ctx, id: int):
        guild = self.bot.get_guild(id)

        for channel in guild.text_channels:
            channels = [channel.id]

        picked = random.choice(channels)
        channel = self.bot.get_channel(picked)

        embed = discord.Embed(
            color=self.bot.embed_color,
            title=f"→ Invite From Guild",
            description=f"• Invite: {await channel.create_invite(max_uses=1)}")

        await ctx.author.send(embed=embed)

        logger.info(f"Owner | Sent Get Invite: {ctx.author}")
Exemple #6
0
    async def status(self, ctx, online_status):
        if str(online_status).lower() == "dnd":
            await self.bot.change_presence(status=discord.Status.dnd)
        elif str(online_status).lower() == "idle":
            await self.bot.change_presence(status=discord.Status.idle)
        elif str(online_status).lower() == "offline":
            await self.bot.change_presence(status=discord.Status.offline)
        else:
            await self.bot.change_presence(status=discord.Status.online)

        embed = discord.Embed(
            color=self.bot.embed_color,
            title="→ Online Status Changed!",
            description=
            f"• My status has been updated to: `{online_status.lower()}`")

        await ctx.send(embed=embed)

        logger.info(
            f"Owner | Sent Status: {ctx.author} | Online Status: {online_status}"
        )
Exemple #7
0
    async def activity(self, ctx, number, *, activity):
        # Type 0 = Playing a game, Type 1 = Live on Twitch, Type 2 = Listening, Type 3 = Watching
        await self.bot.change_presence(
            activity=discord.Activity(type=number, name=activity))

        self.bot.cursor.execute(
            "UPDATE bot_information SET ACTIVITY = ? WHERE ROWID = 1",
            (activity, ))
        self.bot.cursor.execute(
            "UPDATE bot_information SET ACTIVITY_TYPE = ? WHERE ROWID = 1",
            (number, ))

        self.bot.db.commit()

        embed = discord.Embed(
            color=self.bot.embed_color,
            title="→ Bot Activity Changed!",
            description=f"• My activity has been updated to: `{activity}`")

        await ctx.send(embed=embed)

        logger.info(
            f"Owner | Sent Activity: {ctx.author} | Activity: {number} | Status: {activity}"
        )
Exemple #8
0
    async def say(self, ctx, channel: discord.TextChannel, *, message):
        await channel.send(message)

        logger.info(f"Fun | Sent Say: {ctx.author}")