diff options
| -rw-r--r-- | bot/constants.py | 3 | ||||
| -rw-r--r-- | bot/exts/moderation/dm_relay.py | 14 | ||||
| -rw-r--r-- | config-default.yml | 5 | 
3 files changed, 9 insertions, 13 deletions
| diff --git a/bot/constants.py b/bot/constants.py index 883cd531b..bcf246e72 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -402,7 +402,6 @@ class Channels(metaclass=YAMLGetter):      python_events: int      python_news: int      reddit: int -    user_event_announcements: int      dev_contrib: int      dev_core: int @@ -414,7 +413,6 @@ class Channels(metaclass=YAMLGetter):      cooldown: int      attachment_log: int -    dm_log: int      message_log: int      mod_log: int      user_log: int @@ -466,7 +464,6 @@ class Webhooks(metaclass=YAMLGetter):      big_brother: int      dev_log: int -    dm_log: int      duck_pond: int      incidents_archive: int      reddit: int diff --git a/bot/exts/moderation/dm_relay.py b/bot/exts/moderation/dm_relay.py index a03230b3d..1d2206e27 100644 --- a/bot/exts/moderation/dm_relay.py +++ b/bot/exts/moderation/dm_relay.py @@ -1,5 +1,4 @@  import logging -import textwrap  import discord  from discord.ext.commands import Cog, Context, command, has_any_role @@ -50,12 +49,17 @@ class DMRelay(Cog):              await ctx.send(f"{Emojis.cross_mark} No direct message history with {user.mention}.")              return -        metadata = textwrap.dedent(f"""\ -            User: {user} ({user.id}) -            Channel ID: {user.dm_channel.id}\n -        """) +        metadata = ( +            f"User: {user} ({user.id})\n" +            f"Channel ID: {user.dm_channel.id}\n\n" +        )          paste_link = await send_to_paste_service(metadata + output, extension="txt") + +        if paste_link is None: +            await ctx.send(f"{Emojis.cross_mark} Failed to upload output to hastebin.") +            return +          await ctx.send(paste_link)      async def cog_check(self, ctx: Context) -> bool: diff --git a/config-default.yml b/config-default.yml index ea0169cd2..1b5ef42fe 100644 --- a/config-default.yml +++ b/config-default.yml @@ -150,7 +150,6 @@ guild:          python_events:              &PYEVENTS_CHANNEL   729674110270963822          python_news:                &PYNEWS_CHANNEL     704372456592506880          reddit:                     &REDDIT_CHANNEL     458224812528238616 -        user_event_announcements:   &USER_EVENT_A       592000283102674944          # Development          dev_contrib:        &DEV_CONTRIB    635950537262759947 @@ -169,7 +168,6 @@ guild:          # Logs          attachment_log:     &ATTACH_LOG     649243850006855680 -        dm_log:                             653713721625018428          message_log:        &MESSAGE_LOG    467752170159079424          mod_log:            &MOD_LOG        282638479504965634          user_log:                           528976905546760203 @@ -287,7 +285,6 @@ guild:      webhooks:          big_brother:                        569133704568373283          dev_log:                            680501655111729222 -        dm_log:                             654567640664244225          duck_pond:                          637821475327311927          incidents_archive:                  720671599790915702          python_news:        &PYNEWS_WEBHOOK 704381182279942324 @@ -324,7 +321,6 @@ filter:          - *MOD_LOG          - *STAFF_LOUNGE          - *TALENT_POOL -        - *USER_EVENT_A      role_whitelist:          - *ADMINS_ROLE @@ -517,7 +513,6 @@ duck_pond:          - *PYEVENTS_CHANNEL          - *MAILING_LISTS          - *REDDIT_CHANNEL -        - *USER_EVENT_A          - *DUCK_POND          - *CHANGE_LOG          - *STAFF_ANNOUNCEMENTS | 
