예제 #1
0
    async def log_message(self, message: discord.Message):
        if not message.guild or message.guild.id != GUILD_DDNET or message.is_system(
        ) or message.channel.id == CHAN_LOGS:
            return

        embed = discord.Embed(title='Message deleted',
                              description=message.content,
                              color=0xDD2E44,
                              timestamp=datetime.utcnow())

        file = None
        if message.attachments:
            attachment = message.attachments[0]

            # can only properly recover images
            if attachment.filename.endswith(VALID_IMAGE_FORMATS):
                buf = BytesIO()
                try:
                    await attachment.save(buf, use_cached=True)
                except discord.HTTPException:
                    pass
                else:
                    file = discord.File(buf, filename=attachment.filename)
                    embed.set_image(url=f'attachment://{attachment.filename}')

        author = message.author
        embed.set_author(name=f'{author} → #{message.channel}',
                         icon_url=author.avatar_url_as(format='png'))
        embed.set_footer(
            text=f'Author ID: {author.id} | Message ID: {message.id}')

        chan = self.bot.get_channel(CHAN_LOGS)
        await chan.send(file=file, embed=embed)
예제 #2
0
    async def on_message_edit(self, before: discord.Message,
                              after: discord.Message):
        if not before.guild or before.guild.id != GUILD_DDNET or before.is_system(
        ) or before.channel.id == CHAN_LOGS:
            return

        if before.content == after.content:
            return

        desc = f'[Jump to message]({before.jump_url})'
        embed = discord.Embed(title='Message edited',
                              description=desc,
                              color=0xF5B942,
                              timestamp=datetime.utcnow())

        before_content, after_content = self.format_content_diff(
            before.content, after.content)
        embed.add_field(name='Before',
                        value=before_content or '\u200b',
                        inline=False)
        embed.add_field(name='After',
                        value=after_content or '\u200b',
                        inline=False)

        author = before.author
        embed.set_author(name=f'{author} → #{before.channel}',
                         icon_url=author.avatar_url_as(format='png'))
        embed.set_footer(
            text=f'Author ID: {author.id} | Message ID: {before.id}')

        chan = self.bot.get_channel(CHAN_LOGS)
        await chan.send(embed=embed)
예제 #3
0
    async def on_message(self, message: discord.Message) -> None:

        if config.ENV == enums.Environment.DEVELOPMENT:
            return

        if message.guild or message.is_system():
            return

        content = await utils.safe_content(
            self.bot.mystbin,
            message.content) if message.content else "*No content*"

        embed = discord.Embed(
            colour=colours.GREEN,
            title=f"DM from **{message.author}**:",
            description=content).add_field(
                name="Info:",
                value=f"`Channel:` {message.channel} `{message.channel.id}`\n"
                f"`Author:` {message.author} `{message.author.id}`\n"
                f"`Time:` {utils.format_datetime(pendulum.now(tz='UTC'))}\n"
                f"`Jump:` [Click here]({message.jump_url})",
            ).set_footer(text=f"ID: {message.id}")

        __log__.info(
            f"DM from {message.author} ({message.author.id}) | Content: {content}"
        )
        await self.bot.DMS_LOG.send(embed=embed,
                                    username=f"{message.author}",
                                    avatar_url=utils.avatar(message.author))

        await self._log_attachments(webhook=self.bot.DMS_LOG, message=message)
        await self._log_embeds(webhook=self.bot.DMS_LOG, message=message)
예제 #4
0
async def on_message(message: discord.Message):
    greetings_channels = config["Introductions"]["Channels"]
    if (config["Introductions"]["Enabled"]
            and message.channel.id in greetings_channels
            and not intro_journal.is_introduced(message.author)
            and not message.is_system()):
        await handle_introduction(message)
    await Scruffy.process_commands(message)
예제 #5
0
async def on_message(message: discord.Message):
    config = client.get_cog("Config")
    if message.author.bot or message.is_system() or message.guild is None:
        return

    if str(message.guild.id) in config.config["guilds"].keys():
        if not message.channel.id == config.config["guilds"][str(
                message.guild.id)]["channel"]:
            await client.process_commands(message)
    else:
        await client.process_commands(message)
예제 #6
0
    async def create_message(self, message: discord.Message) -> Message:
        log.debug(
            "Attempting to create a new message for author(id=%s) in Guild(%s)",
            message.author.id,
            message.guild.id,
        )
        if message.is_system():
            raise InvalidMessage(
                "Message is a system one, we don't check against those.")

        content = ""
        if message.stickers:
            # 'sticker' urls should be unique..
            all_stickers = "|".join(s.url for s in message.stickers)
            content += all_stickers

        elif not bool(message.content and message.content.strip()):
            if not message.embeds and not message.attachments:
                # System message? Like on join trip these
                raise LogicError

            if not message.embeds:
                # We don't check agaisn't attachments
                raise InvalidMessage

            for embed in message.embeds:
                if not isinstance(embed, discord.Embed):
                    raise LogicError

                if embed.type.lower() != "rich":
                    raise LogicError

                content += await self.embed_to_string(embed)
        else:
            content += message.clean_content

        if self.handler.options.delete_zero_width_chars:
            content = (content.replace("u200B", "").replace(
                "u200C",
                "").replace("u200D",
                            "").replace("u200E",
                                        "").replace("u200F",
                                                    "").replace("uFEFF", ""))

        return Message(
            id=message.id,
            channel_id=message.channel.id,
            guild_id=message.guild.id,
            author_id=message.author.id,
            content=content,
        )
예제 #7
0
파일: school.py 프로젝트: stijndcl/didier
    async def pin(self, ctx, message: discord.Message):
        # In case people abuse, check if they're blacklisted
        blacklist = []

        if ctx.author.id in blacklist:
            return

        if message.is_system():
            return await ctx.send(
                "Dus jij wil system messages pinnen?\nMag niet.")

        await message.pin(
            reason="Didier Pin door {}".format(ctx.author.display_name))
        await ctx.message.add_reaction("✅")
예제 #8
0
    async def on_message(
        self, message: discord.Message
    ):  # log user_id, server_id, message time and jump url to db
        if message.author.bot is True:
            return

        if type(message.channel) is discord.DMChannel:
            return

        if message.is_system():
            return

        gid = str(message.guild.id)
        config = self.bot.servers_config[gid]

        if config['tracking']['last_message']:
            if message.channel.category_id in config['tracking'][
                    'ignore_categories']:
                # don't log if in these categories
                return

            u_id = message.author.id
            new_time = message.created_at.timestamp()

            check = self.bot.db_quick_read(u_id, message.guild.id)
            if check is None:
                query = """
                INSERT INTO
                    activity(user_id, server_id, message_last_time, message_last_url)
                VALUES
                    ({}, {}, {}, "{}")
                """.format(u_id, message.guild.id, new_time, message.jump_url)
            else:
                db_id, __user_id, __server_id, __message_last_time, __message_last_url = check
                query = """
                UPDATE
                    activity
                SET
                    message_last_time = {},
                    message_last_url = "{}"
                WHERE
                    db_id = {}
                """.format(new_time, message.jump_url, db_id)

            self.bot.execute_query(query)  # eq =
예제 #9
0
 async def on_message_edit(self, before: discord.Message,
                           after: discord.Message):
     if (after.author != self.bot.user) and (not after.is_system()) and (
             after.guild is not None):
         if self._check_message(after):
             await self._flag_message(after)
예제 #10
0
 async def on_message(self, message: discord.Message):
     if (message.author != self.bot.user) and (
             not message.is_system()) and (message.guild is not None):
         if self._check_message(message):
             await self._flag_message(message)
예제 #11
0
    async def message_delete_logger(self, message: discord.Message):
        logger_config = self._config.get("loggers", {})

        if message.guild is None:
            return

        if "messageDelete" not in logger_config.keys():
            return

        if message.channel.id in logger_config.get('__global__', {}).get(
                "ignoredChannels", []):
            return

        server_log_channel = self._config.get('specialChannels', {}).get(
            ChannelKeys.STAFF_LOG.value, -1)
        alert_channel = self._config.get('specialChannels',
                                         {}).get(ChannelKeys.MESSAGE_LOG.value,
                                                 None)

        if alert_channel is None:
            return

        alert_channel = message.guild.get_channel(alert_channel)

        # Allow event cleanups for bot users.
        if (message.channel.id in [alert_channel.id, server_log_channel
                                   ]) and message.author.bot:
            return

        embed = discord.Embed(color=Colors.WARNING)

        embed.set_author(name=f"Deleted Message in #{message.channel.name}",
                         icon_url=message.author.avatar_url)
        embed.add_field(name="Author", value=message.author, inline=True)
        embed.add_field(name="Message ID", value=message.id, inline=True)
        embed.add_field(name="Channel",
                        value=message.channel.mention,
                        inline=True)
        embed.add_field(name="Send Timestamp",
                        value=message.created_at.strftime(DATETIME_FORMAT),
                        inline=True)
        embed.add_field(name="Delete Timestamp",
                        value=HuskyUtils.get_timestamp(),
                        inline=True)
        if len(message.embeds):
            embed.add_field(name="Embed Count",
                            value=f"{len(message.embeds)}",
                            inline=True)
        if message.type != discord.MessageType.default:
            embed.add_field(name="Message Type",
                            value=f"`{message.type}`",
                            inline=True)
        if message.is_system():
            embed.add_field(name="System Message", value="True", inline=True)

        if message.content is not None and message.content != "":
            embed.add_field(name="Message",
                            value=HuskyUtils.trim_string(
                                message.clean_content, 1000, True),
                            inline=False)

        if message.attachments is not None and len(message.attachments) > 1:
            attachments_list = str(f"- {a.url}\n" for a in message.attachments)
            embed.add_field(name="Attachments",
                            value=HuskyUtils.trim_string(
                                attachments_list, 1000, True),
                            inline=False)
        elif message.attachments is not None and len(message.attachments) == 1:
            embed.add_field(name="Attachment URL",
                            value=message.attachments[0].url,
                            inline=False)
            embed.set_image(url=message.attachments[0].proxy_url)

        await alert_channel.send(embed=embed)
예제 #12
0
async def on_message(message: Message):
    if message.is_system():
        if message.channel.id == 710597940573503518:
            await message.add_reaction("🇹")
            await message.add_reaction("🇭")
            await message.add_reaction("🇦")
            await message.add_reaction("🇳")
            await message.add_reaction("🇰")
            await message.add_reaction("🇾")
            await message.add_reaction("🇴")
            await message.add_reaction("🇺")
            await message.add_reaction("<a:as_black_hearts:710602475719229602>"
                                       )
            embed = discord.Embed(
                description=
                "**Thank you so much for deciding to boost Asmodeus✨!**\n\nYou're now eligible for all the stuff listed in <#710597943232692375>. You can also see them by using the ``!tag boosting`` command in any of the text channels.\n\nPlease contact <@680519129219727380> to collect your perks for boosting.\n\n``` ```",
                color=0xFFB6C1,
                timestamp=datetime.utcnow())
            embed.set_thumbnail(
                url=
                "https://cdn.discordapp.com/attachments/680521500352315423/685555150085029915/asmodeus_boosted_thumbnail.png"
            )
            embed.set_image(
                url=
                "https://cdn.discordapp.com/attachments/680521500352315423/685556831761989676/ily.gif"
            )
            await message.author.send("``` ```", embed=embed)
            await message.author.send("``` ```")
            await message.channel.send("<3 {}".format(message.author.mention))

    elif message.content.lower(
    ) == "nigger" or "nigger" in message.content.lower():
        await message.delete()
    elif message.channel.id == 710598783100256337:
        if message.author.bot == True:
            return
        await message.channel.set_permissions(message.author,
                                              send_messages=False)
        intros = message.channel
        chan = bot.get_channel(670392877800620033)
        print(chan)
        msg = None
        async for message in chan.history(limit=1):
            msg = await intros.fetch_message(int(message.content))
            await message.delete()
        await msg.delete()
        embed = discord.Embed(
            title="‧̍̊˙˚˙ᵕ꒳ᵕ˙˚˙─Reminder:─˙˚˙ᵕ꒳ᵕ˙˚˙‧̍̊",
            description=
            "**Before you post your introduction, keep in mind:**\n<a:as_black_hearts:710602475719229602> - You are allowed to post __one message__ in this channel, keep that in mind while making your introduction. After posting the introduction the channel will become __read-only__.\n<a:as_black_hearts:710602475719229602> - Deleting your introduction __will not__ let you type again, Please contact <@680519129219727380> if you want to edit your introduction.\n<a:as_black_hearts:710602475719229602> - Useless messages in this channel will be deleted.",
            color=0x000000,
            timestamp=datetime.utcnow())
        msg2 = await intros.send(embed=embed)
        await chan.send("{}".format(msg2.id))
    elif message.channel.id == 710597943232692375 and message.author.bot == False:
        boosters = message.channel
        chan = bot.get_channel(670392843508121652)
        print(chan)
        msg = None
        async for message in chan.history(limit=1):
            msg = await boosters.fetch_message(int(message.content))
            await message.delete()
        await msg.delete()
        embed = discord.Embed(
            title=".・゜-: ✧ :- Booster Perks -: ✧ :-゜・.",
            description=
            "<a:as_black_hearts:710602475719229602> ─ You will get permission to advertise whatever you want in <#710597943232692375>.\n\n<a:as_black_hearts:710602475719229602> ─ You will get the booster role that is hoisted above the members.\n\n<a:as_black_hearts:710602475719229602> ─ You get a special role, which you personalize with name and color.\n\n<a:as_black_hearts:710602475719229602> ─ You get a custom response when someone mentions your name in the chat. \n\n<a:as_black_hearts:710602475719229602> ─ You can apply for staff even if the applications are closed.\n\n<a:as_black_hearts:710602475719229602> ─ Higher chances in winning future giveaways, also booster only giveaways. \n\n<a:as_black_hearts:710602475719229602> ─ You will get your own voice channel and text channel, alike a blog, where it can be public or private. You can invite your friends in it and do whatever your hearts desire. \n\n<a:as_black_hearts:710602475719229602> ─ You'll get access to the logs (join/leave, deleted and edit messages, etc) without having to be staff.",
            color=0xB6B3FC,
            timestamp=datetime.utcnow())
        msg2 = await boosters.send(embed=embed)
        await chan.send("{}".format(msg2.id))
    elif bot.user.mentioned_in(message):
        if "ping" in message.content:
            await message.channel.send("{} pong".format(message.author.mention)
                                       )
        elif "pong" in message.content:
            await message.channel.send("{} ping".format(message.author.mention)
                                       )
        else:
            splitted = message.content.split(" ")
            if len(splitted) > 1:
                return
            prefix = None
            for key, value in serverPrefixes.items():
                if int(key) == message.guild.id:
                    prefix = str(value)
            if prefix is None:
                prefix = "! (Default)"
            sb = None
            for key, value in starboardChannels.items():
                if int(key) == message.guild.id:
                    sbb = bot.get_channel(int(value))
                    sb = sbb.mention
            if sb is None:
                sb = "Not enabled, use the ``scoreboard`` command to enable it."
            confess = None
            for key, value in confessChannels.items():
                if int(key) == message.guild.id:
                    confesss = bot.get_channel(int(value))
                    confess = confesss.mention
            if confess is None:
                confess = "Not enabled, use the ``setconfess`` command to enable it."
            muted = None
            for key, value in serverMuted.items():
                if int(key) == message.guild.id:
                    mutedd = message.guild.get_role(int(value))
                    muted = mutedd.mention
            if muted is None:
                muted = "Not set, use the ``setmuted`` command to set it. Otherwise ``mute`` wouldn't work."
            editLogsS = None
            deleteLogsS = None
            memberLogsS = None
            punishLogsS = None
            for key, value in deleteLogs.items():
                if int(key) == message.guild.id:
                    deleteLogss = bot.get_channel(int(value))
                    deleteLogsS = deleteLogss.mention
            if deleteLogs is None:
                deleteLogsS = ":x:"
            for key, value in editLogs.items():
                if int(key) == message.guild.id:
                    editLogss = bot.get_channel(int(value))
                    editLogsS = editLogss.mention
            if editLogs is None:
                editLogsS = ":x:"
            for key, value in memberLogs.items():
                if int(key) == message.guild.id:
                    memberLogss = bot.get_channel(int(value))
                    memberLogsS = memberLogss.mention
            if memberLogs is None:
                memberLogsS = ":x:"
            for key, value in punishLogs.items():
                if int(key) == message.guild.id:
                    punishLogss = bot.get_channel(int(value))
                    punishLogsS = punishLogss.mention
            if punishLogs is None:
                punishLogsS = ":x:"
            embed = discord.Embed(
                description=
                "Haay! Here to help you.\n**Server prefix:** ``{}``\n**Starboard channel:** {}\n**Confess channel:** {}\n**Muted role:** {}\n\n**Logs:**\n``Delete:`` {}\n``Edit:`` {}\n``Member:`` {}\n``Punish:`` {}"
                .format(str(prefix), sb, confess, muted, deleteLogsS,
                        editLogsS, memberLogsS, punishLogsS),
                color=0x000000,
                timestamp=datetime.utcnow())
            embed.set_author(name="{}".format(bot.user.name),
                             icon_url=bot.user.avatar_url)
            embed.set_thumbnail(url=message.guild.icon_url)
            await message.channel.send(embed=embed)
    #if ((message.channel.id == 642482771511476234) or (message.channel.id == 629056727186407445)) and message.author.bot and message.author.id != 640827656660582400:
    #    await message.delete()
    #    return
    if message.channel.id == 642482779111555072 or message.channel.id == 642482779925250067 or message.channel.id == 642482780797665290 or message.channel.id == 642482781812686866:
        if len(message.attachments) == 0:
            if message.author.id != 237938976999079948:
                await message.delete()
                await message.author.send(
                    "> :red_circle: You're only allowed to post images in {}.".
                    format(message.channel.mention))
    global msgsCounterr
    global msgsCounterrr
    global allTimeMessages
    msgsCounterr += 1
    msgsCounterrr += 1
    allTimeMessages += 1
    if message.guild is None:
        await bot.process_commands(message)
        return
    if message.content == "/get bot_invite":
        embed = discord.Embed(
            description=
            "You can invite me from [here](https://discordapp.com/oauth2/authorize?client_id=640827656660582400&scope=bot&permissions=2097151191)!"
        )
        await message.channel.send(embed=embed)
    if message.content == "/get repo":
        embed = discord.Embed(
            description=
            "[My insides~](https://www.github.com/Shikiiii/Asmodeus)")
        await message.channel.send(embed=embed)
    if message.channel.id == 660636770777694243:
        role_names = {
            "Light Red", "Light Orange", "Light Purple", "Light Yellow",
            "Light Cyan", "Light Blue", "Light Green", "Light Pink",
            "Dark Red", "Dark Blue", "Dark Purple", "Dark Pink", "Crimson",
            "Black", "Gray", "Indigo", "Lavender", "Violet", "White",
            "Magenta", "Cream"
        }
        await message.delete()
        if message.content == "none":
            toremove = []
            for user_role in message.author.roles:
                if user_role.name in role_names:
                    toremove.append(user_role)
            for user_role in toremove:
                await message.author.remove_roles(user_role)
            return
        rolee = await convert_color_menu(message.content)
        if rolee == "none":
            new_role = discord.utils.get(message.author.guild.roles,
                                         name=message.content)
            if hasattr(new_role, "id"):
                toremove = []
                for user_role in message.author.roles:
                    if user_role.name in role_names:
                        toremove.append(user_role)
                for user_role in toremove:
                    await message.author.remove_roles(user_role)
                await message.author.add_roles(new_role)
        else:
            new_role = discord.utils.get(message.author.guild.roles,
                                         name=rolee)
            toremove = []
            for user_role in message.author.roles:
                if user_role.name in role_names:
                    toremove.append(user_role)
            for user_role in toremove:
                await message.author.remove_roles(user_role)
            await message.author.add_roles(new_role)
    if message.guild.id == 627928375989764138 and message.channel.id == 627947531325669386:
        chan = discord.utils.get(message.guild.channels, name="x【lounge】x")
        await chan.send("{}".format(message.content))
    if len(message.mentions) > 0:
        if message.author.id != 594131533745356804:
            for key in afklist:
                usr = message.guild.get_member(key)
                if usr.mentioned_in(message):
                    reason = afklist[key]
                    await message.channel.send("{} is AFK: **{}**".format(
                        usr.mention, str(reason)))
    if message.author.id in afklist:
        oldnick = str(message.author.display_name)
        newnick = oldnick[6:]
        await message.author.edit(nick="{}".format(newnick))
        del afklist[message.author.id]
        await message.channel.send(
            "Welcome back, {}! I removed your AFK.".format(
                message.author.mention))
    if (message.content == "!welcome"
            and (message.author.id == 237938976999079948
                 or message.author.id == 495680416422821888)):
        embed1 = discord.Embed(
            title="**༚ ✧˳⁺ __Welcome to Asmodeus!__  ⁺˳✧ ༚**",
            description=
            "We're so glad to have you here! By staying in this server, you agree to our __rules__. We have over 100 bots, channels and roles to play around with! Make sure to stick around for more cool stuff. We are a friendly community, we accept everyone regardless of your gender, age, race or etc.",
            color=0xC5FCFC)
        embed2 = discord.Embed(color=0xC5FCFC)
        embed2.set_image(
            url=
            "https://cdn.discordapp.com/attachments/635581513228091462/637970310095831061/Untitled-1.png"
        )
        await message.channel.send(embed=embed2)
        await message.channel.send(embed=embed1)
    elif (message.content == "!rules"
          and (message.author.id == 237938976999079948
               or message.author.id == 495680416422821888)):
        embed1 = discord.Embed(
            title="**༚ ✧˳⁺ __Server rules__ ⁺˳✧ ༚**",
            description=
            "``1`` - **Make sure to follow the [Discord TOS](https://discordapp.com/terms) and the [Community Guidelines](https://discordapp.com/guidelines)**. \n\n``2`` - This is a **friendly community**. Any toxicity, hate or racism is banned.\n\n``3`` - Hard 'R' is banned unless you're black.\n\n``4`` - Playing a mf hacker is a really, really dumb move. Linking someone's personal information (doxing them) would get you instantly banned.\n\n``5`` - Advertising is completely banned (including DM/PM advertising). If someone's DMing you ads of any sort, let staff know, they'll handle it.\n\n``6`` - Respect all members and staff, their decision(s) and wishes.\n\nOther than that, please **use common sense** while you are typing in any of the text channels. This means no spamming, raiding, insulting, etc.\n\nFor any problems: <@237938976999079948> | If you've found any loopholes in the rules, DM <@237938976999079948>.",
            timestamp=datetime.utcnow(),
            color=0xC5FCFC)
        embed1.set_footer(text="Last update:")
        #embed2 = discord.Embed(color=0xC5FCFC)
        #embed2.set_image(url="https://media.giphy.com/media/kD0G3PwfsUhUzQu3QQ/giphy.gif")
        #embed3 = discord.Embed(title="**༚ ✧˳⁺ __Voice Chat rules__ ⁺˳✧ ༚**",
        #                       description="__``1``__ • Don't ear rape other people with music or with your mic. \r\n\r\n __``2``__ • Do not spam music, let other people play their song. \r\n\r\n __``3``__ • Do not stop the music if there are still others in the voice channel. \r\n\r\n __``4``__ • Do not mic spam, yell or disturb others. \r\n\r\n __``5``__ • Do NOT be toxic or be racist.",
        #                      color=0xC5FCFC)
        #await message.channel.send(embed=embed2)
        #await message.channel.send(embed=embed3)
        await message.channel.send(embed=embed1)
    elif (message.content == "!faq"
          and (message.author.id == 237938976999079948
               or message.author.id == 495680416422821888)):
        embed1 = discord.Embed(
            title="*__**FAQ**:__*",
            description=
            "__**How can I level up?**__ \r\n\r\n To level up you have to be active in any channel in the server, avoid spamming. Spamming won't level you up. \r\n\r\n __**Is there a way to get picture perms/embed links?**__ \r\n\r\n Yes there is a way to get these perms, when you reach **level 10+** you'll be able to post pictures or links.. \r\n\r\n __**Someone is advertising in my DMS what do I do?**__ \r\n\r\n Dm a staff member and they'll ban them as soon as possible. \r\n\r\n __**Staff is abusing his perms, what do I do?**__ \r\n\r\n DM <@237938976999079948>. \r\n\r\n __**Do you guys do giveaways and events?**__ \r\n\r\n Yes we do events and giveaways sometimes. \r\n\r\n __**I want to apply for a Partner Manager, how can I do that?**__ \r\n\r\n DM <@237938976999079948>.",
            color=0xC5FCFC)
        embed2 = discord.Embed(color=0xC5FCFC)
        embed2.set_image(
            url="https://media.giphy.com/media/WtISnEdn9w4jjSZNtC/giphy.gif")
        embed3 = discord.Embed(
            title="",
            description=
            "__**Can we be partners?**__ \r\n\r\n Sure! You can be partner with us by messaging one of the PMs.\r\n\r\n __**I got banned for no reason, what do I do?**__ \r\n\r\n Simply DM the owner <@237938976999079948> and I'll unban you as soon as possible! \r\n\r\n __**Can I get a color?**__ \r\n\r\n Yes, you can pick a color form our [colors menu](https://discordapp.com/channels/627928375989764138/629061888646316032/629220377637421067). \r\n\r\n __**Someone leaked my pictures, IP, phone number. What do I do?**__ \r\n\r\n DM one of the staff members and they'll ban them. \r\n\r\n __**When was this server created?**__ \r\n\r\n created on 29/9/2019, but was released public on 14/10/2019. \r\n\r\n __**Is this a dating server?**__ \r\n\r\n Nope, this is a chill server to talk to new people and make friends. However, we won't stop you if you're dating **__AND__** you're 18 or above.",
            color=0xC5FCFC)
        await message.channel.send(embed=embed2)
        await message.channel.send(embed=embed1)
        await message.channel.send(embed=embed3)
    elif (message.content == "!staff"
          and (message.author.id == 237938976999079948
               or message.author.id == 495680416422821888)):
        embed1 = discord.Embed(
            title="**__Staff Members:__**",
            description=
            "☆ - Owners: glow <@514392208254959618> | Shiki <@237938976999079948>. \r\n\r\n ☆ - Co Owners: zyzz <@543885407071371340>\r\n\r\n☆ - Admins: zip <@267631540811464704> \r\n\r\n ☆ - Mods: Alex <@444751983786852362> | System <@316988095562252290>",
            color=0xFF93F0)
        embed2 = discord.Embed(color=0xFF93F0)
        embed2.set_image(
            url="https://media.giphy.com/media/Xy1debdAWrNLK3cnHk/giphy.gif")
        embed3 = discord.Embed(
            title="**__Perm invite links:__**",
            description="🔗 Perm invite link: https://discord.gg/GJ5UDth",
            color=0xFF93F0)
        await message.channel.send(embed=embed2)
        await message.channel.send(embed=embed1)
        await message.channel.send(embed=embed3)
    elif (message.content == "!verification"
          and (message.author.id == 237938976999079948
               or message.author.id == 495680416422821888)):
        embed1 = discord.Embed(
            title="**༚ ✧˳⁺ Verification ⁺˳✧ ༚**",
            description=
            "✧ - Post selfie in <#627942893448986713> with \"Shiki\" written on a piece of paper. \r\n\r\n ✧ - Verified role gives you access to <#627942990186283039> or <#627943195069775912> depends on your gender. \r\n\r\n If you're feeling uncomfortable with posting your selfie, you can DM the selfie to the owner.",
            color=0xC5FCFC)
        await message.channel.send(embed=embed1)
    elif message.content == "info":
        await message.channel.send(
            "Hi! I'm currently in **{}** guilds, seeing a total of **{}** users.\n**{}** messages were sent in the past hour, and **{}** messages were sent since last restart.\n**{}** messages were sent in global (LAST RESET: 13/10/19 @ 2:55PM GTM+3)"
            .format(len(bot.guilds), len(bot.users), msgsCounterrr,
                    msgsCounterr, allTimeMessages))
    elif message.content == "invite":
        online = 0
        for member in message.guild.members:
            if member.status != discord.Status.offline:
                online += 1
        embed = discord.Embed(
            description=
            "\n[Asmodeus](https://discord.gg/ANQSkTq) \n\n- e-girls, fun, socializing, chilling and more! \n\n⬤ {} Online ⭘ {} Members"
            .format(online, message.guild.member_count),
            color=0x000000)
        embed.set_author(name="YOU'VE BEEN INVITED TO JOIN A SERVER\n",
                         icon_url=message.author.avatar_url)
        embed.set_thumbnail(url=message.guild.icon_url)
        await message.channel.send(embed=embed)
        msg = await message.channel.send(
            "Get the direct link DMed to you by reacting here!")
        await msg.add_reaction("📧")

        def check(reaction, user):
            return user == message.author and str(reaction.emoji) == '📧'

        try:
            await bot.wait_for('reaction_add', timeout=15.0, check=check)
        except asyncio.TimeoutError:
            await msg.delete()
        else:
            try:
                await message.author.send(
                    "Direct link: https://discord.gg/ANQSkTq", embed=embed)
            except:
                await message.channel.send(
                    "{}, your DMs are disabled, so I couldn't DM you the invite link!"
                    .format(message.author.mention))
            await msg.delete()
    #elif "uwu" in message.content or "UwU" in message.content or "uWu" in message.content or "Uwu" in message.content or "uwU" in message.content:
    #   await message.delete()
    elif message.content == "shiki":
        await message.channel.send(
            "dm <@237938976999079948> with thigh pics for free admin aha x")
    elif message.content == "no u" and message.author.bot == False:
        await message.channel.send("no u")
    elif message.content == "alex":
        await message.channel.send("biggest retard")
    elif message.content == "kam" or message.content == "kamera":
        await message.channel.send(
            "dm <@567799351368482826> for a Daddy :wink:")
    elif message.content == "madz":
        await message.channel.send("shrek is love, shrek is life")
    elif message.content == "meg":
        await message.channel.send("wooden hoe *with loyalty 1")
    elif message.content == "david":
        await message.channel.send("looking at maps")
    elif message.content == "sora":
        await message.channel.send("gift me money")
    elif message.content == "riv":
        await message.channel.send("i'm bored")
    elif message.content == "nix":
        await message.channel.send("what do you want this time")
    #blank = bot.get_user(635191040764018719)
    #elif message.content == "blank" or blank.mentioned_in(message):
    #    await message.channel.send("server sugar daddy")

    await bot.process_commands(message)
예제 #13
0
파일: lar.py 프로젝트: omaemae/bob
    async def on_message(self, message: discord.Message):
        if message.author.bot or message.is_system() or message.guild is None:
            return

        await self.learn(message)
        await self.reply(message)