We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
warnaction add throws OSErrors
# Command bugs

<!-- 
Did you find a bug with a command? Fill out the following:
-->

#### Command name

warnaction

#### What cog is this command from?

Warnings

#### What were you expecting to happen?

an action was created when I try to add automated actions to warnings

#### What actually happened?
```
Exception in command 'warnaction add'
Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
  File "/root/redenv/lib/python3.8/site-packages/redbot/cogs/warnings/warnings.py", line 103, in action_add
  File "/root/redenv/lib/python3.8/site-packages/redbot/cogs/warnings/helpers.py", line 111, in get_command_for_exceeded_points
  File "/root/redenv/lib/python3.8/site-packages/redbot/cogs/warnings/helpers.py", line 72, in get_command_from_input
  File "/usr/lib/python3.8/inspect.py", line 985, in getsource
    lines, lnum = getsourcelines(object)
  File "/usr/lib/python3.8/inspect.py", line 967, in getsourcelines
    lines, lnum = findsource(object)
  File "/usr/lib/python3.8/inspect.py", line 798, in findsource
    raise OSError('could not get source code')
OSError: could not get source code

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
  File "/root/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 794, in invoke
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1234, in invoke
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: OSError: could not get source code
```

#### How can we reproduce this issue?

Install Red-Bot
try to add an action to warnings
profit?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `redbot/cogs/warnings/helpers.py`
Content:
```
1 from copy import copy
2 import asyncio
3 import inspect
4 import discord
5 
6 from redbot.core import Config, checks, commands
7 from redbot.core.i18n import Translator
8 from redbot.core.utils.predicates import MessagePredicate
9 
10 _ = Translator("Warnings", __file__)
11 
12 
13 async def warning_points_add_check(
14     config: Config, ctx: commands.Context, user: discord.Member, points: int
15 ):
16     """Handles any action that needs to be taken or not based on the points"""
17     guild = ctx.guild
18     guild_settings = config.guild(guild)
19     act = {}
20     async with guild_settings.actions() as registered_actions:
21         for a in registered_actions:
22             # Actions are sorted in decreasing order of points.
23             # The first action we find where the user is above the threshold will be the
24             # highest action we can take.
25             if points >= a["points"]:
26                 act = a
27                 break
28     if act and act["exceed_command"] is not None:  # some action needs to be taken
29         await create_and_invoke_context(ctx, act["exceed_command"], user)
30 
31 
32 async def warning_points_remove_check(
33     config: Config, ctx: commands.Context, user: discord.Member, points: int
34 ):
35     guild = ctx.guild
36     guild_settings = config.guild(guild)
37     act = {}
38     async with guild_settings.actions() as registered_actions:
39         for a in registered_actions:
40             if points >= a["points"]:
41                 act = a
42             else:
43                 break
44     if act and act["drop_command"] is not None:  # some action needs to be taken
45         await create_and_invoke_context(ctx, act["drop_command"], user)
46 
47 
48 async def create_and_invoke_context(
49     realctx: commands.Context, command_str: str, user: discord.Member
50 ):
51     m = copy(realctx.message)
52     m.content = command_str.format(user=user.mention, prefix=realctx.prefix)
53     fctx = await realctx.bot.get_context(m, cls=commands.Context)
54     try:
55         await realctx.bot.invoke(fctx)
56     except (commands.CheckFailure, commands.CommandOnCooldown):
57         await fctx.reinvoke()
58 
59 
60 def get_command_from_input(bot, userinput: str):
61     com = None
62     orig = userinput
63     while com is None:
64         com = bot.get_command(userinput)
65         if com is None:
66             userinput = " ".join(userinput.split(" ")[:-1])
67         if len(userinput) == 0:
68             break
69     if com is None:
70         return None, _("I could not find a command from that input!")
71 
72     check_str = inspect.getsource(checks.is_owner)
73     if any(inspect.getsource(x) in check_str for x in com.checks):
74         # command the user specified has the is_owner check
75         return (
76             None,
77             _("That command requires bot owner. I can't allow you to use that for an action"),
78         )
79     return "{prefix}" + orig, None
80 
81 
82 async def get_command_for_exceeded_points(ctx: commands.Context):
83     """Gets the command to be executed when the user is at or exceeding
84     the points threshold for the action"""
85     await ctx.send(
86         _(
87             "Enter the command to be run when the user **exceeds the points for "
88             "this action to occur.**\n**If you do not wish to have a command run, enter** "
89             "`none`.\n\nEnter it exactly as you would if you were "
90             "actually trying to run the command, except don't put a prefix and "
91             "use `{user}` in place of any user/member arguments\n\n"
92             "WARNING: The command entered will be run without regard to checks or cooldowns. "
93             "Commands requiring bot owner are not allowed for security reasons.\n\n"
94             "Please wait 15 seconds before entering your response."
95         )
96     )
97     await asyncio.sleep(15)
98 
99     await ctx.send(_("You may enter your response now."))
100 
101     try:
102         msg = await ctx.bot.wait_for(
103             "message", check=MessagePredicate.same_context(ctx), timeout=30
104         )
105     except asyncio.TimeoutError:
106         return None
107     else:
108         if msg.content == "none":
109             return None
110 
111     command, m = get_command_from_input(ctx.bot, msg.content)
112     if command is None:
113         await ctx.send(m)
114         return None
115 
116     return command
117 
118 
119 async def get_command_for_dropping_points(ctx: commands.Context):
120     """
121     Gets the command to be executed when the user drops below the points
122     threshold
123 
124     This is intended to be used for reversal of the action that was executed
125     when the user exceeded the threshold
126     """
127     await ctx.send(
128         _(
129             "Enter the command to be run when the user **returns to a value below "
130             "the points for this action to occur.** Please note that this is "
131             "intended to be used for reversal of the action taken when the user "
132             "exceeded the action's point value.\n**If you do not wish to have a command run "
133             "on dropping points, enter** `none`.\n\nEnter it exactly as you would "
134             "if you were actually trying to run the command, except don't put a prefix "
135             "and use `{user}` in place of any user/member arguments\n\n"
136             "WARNING: The command entered will be run without regard to checks or cooldowns. "
137             "Commands requiring bot owner are not allowed for security reasons.\n\n"
138             "Please wait 15 seconds before entering your response."
139         )
140     )
141     await asyncio.sleep(15)
142 
143     await ctx.send(_("You may enter your response now."))
144 
145     try:
146         msg = await ctx.bot.wait_for(
147             "message", check=MessagePredicate.same_context(ctx), timeout=30
148         )
149     except asyncio.TimeoutError:
150         return None
151     else:
152         if msg.content == "none":
153             return None
154     command, m = get_command_from_input(ctx.bot, msg.content)
155     if command is None:
156         await ctx.send(m)
157         return None
158 
159     return command
160
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/redbot/cogs/warnings/helpers.py b/redbot/cogs/warnings/helpers.py
--- a/redbot/cogs/warnings/helpers.py
+++ b/redbot/cogs/warnings/helpers.py
@@ -1,9 +1,9 @@
 from copy import copy
 import asyncio
-import inspect
 import discord
 
 from redbot.core import Config, checks, commands
+from redbot.core.commands.requires import PrivilegeLevel
 from redbot.core.i18n import Translator
 from redbot.core.utils.predicates import MessagePredicate
 
@@ -54,7 +54,9 @@
     try:
         await realctx.bot.invoke(fctx)
     except (commands.CheckFailure, commands.CommandOnCooldown):
-        await fctx.reinvoke()
+        # reinvoke bypasses checks and we don't want to run bot owner only commands here
+        if fctx.command.requires.privilege_level < PrivilegeLevel.BOT_OWNER:
+            await fctx.reinvoke()
 
 
 def get_command_from_input(bot, userinput: str):
@@ -69,9 +71,7 @@
     if com is None:
         return None, _("I could not find a command from that input!")
 
-    check_str = inspect.getsource(checks.is_owner)
-    if any(inspect.getsource(x) in check_str for x in com.checks):
-        # command the user specified has the is_owner check
+    if com.requires.privilege_level >= PrivilegeLevel.BOT_OWNER:
         return (
             None,
             _("That command requires bot owner. I can't allow you to use that for an action"),

{"golden_diff": "diff --git a/redbot/cogs/warnings/helpers.py b/redbot/cogs/warnings/helpers.py\n--- a/redbot/cogs/warnings/helpers.py\n+++ b/redbot/cogs/warnings/helpers.py\n@@ -1,9 +1,9 @@\n from copy import copy\n import asyncio\n-import inspect\n import discord\n \n from redbot.core import Config, checks, commands\n+from redbot.core.commands.requires import PrivilegeLevel\n from redbot.core.i18n import Translator\n from redbot.core.utils.predicates import MessagePredicate\n \n@@ -54,7 +54,9 @@\n     try:\n         await realctx.bot.invoke(fctx)\n     except (commands.CheckFailure, commands.CommandOnCooldown):\n-        await fctx.reinvoke()\n+        # reinvoke bypasses checks and we don't want to run bot owner only commands here\n+        if fctx.command.requires.privilege_level < PrivilegeLevel.BOT_OWNER:\n+            await fctx.reinvoke()\n \n \n def get_command_from_input(bot, userinput: str):\n@@ -69,9 +71,7 @@\n     if com is None:\n         return None, _(\"I could not find a command from that input!\")\n \n-    check_str = inspect.getsource(checks.is_owner)\n-    if any(inspect.getsource(x) in check_str for x in com.checks):\n-        # command the user specified has the is_owner check\n+    if com.requires.privilege_level >= PrivilegeLevel.BOT_OWNER:\n         return (\n             None,\n             _(\"That command requires bot owner. I can't allow you to use that for an action\"),\n", "issue": "warnaction add throws OSErrors\n# Command bugs\r\n\r\n<!-- \r\nDid you find a bug with a command? Fill out the following:\r\n-->\r\n\r\n#### Command name\r\n\r\nwarnaction\r\n\r\n#### What cog is this command from?\r\n\r\nWarnings\r\n\r\n#### What were you expecting to happen?\r\n\r\nan action was created when I try to add automated actions to warnings\r\n\r\n#### What actually happened?\r\n```\r\nException in command 'warnaction add'\r\nTraceback (most recent call last):\r\n  File \"/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py\", line 83, in wrapped\r\n  File \"/root/redenv/lib/python3.8/site-packages/redbot/cogs/warnings/warnings.py\", line 103, in action_add\r\n  File \"/root/redenv/lib/python3.8/site-packages/redbot/cogs/warnings/helpers.py\", line 111, in get_command_for_exceeded_points\r\n  File \"/root/redenv/lib/python3.8/site-packages/redbot/cogs/warnings/helpers.py\", line 72, in get_command_from_input\r\n  File \"/usr/lib/python3.8/inspect.py\", line 985, in getsource\r\n    lines, lnum = getsourcelines(object)\r\n  File \"/usr/lib/python3.8/inspect.py\", line 967, in getsourcelines\r\n    lines, lnum = findsource(object)\r\n  File \"/usr/lib/python3.8/inspect.py\", line 798, in findsource\r\n    raise OSError('could not get source code')\r\nOSError: could not get source code\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/root/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py\", line 892, in invoke\r\n  File \"/root/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py\", line 794, in invoke\r\n  File \"/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py\", line 1234, in invoke\r\n  File \"/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py\", line 797, in invoke\r\n  File \"/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py\", line 92, in wrapped\r\ndiscord.ext.commands.errors.CommandInvokeError: Command raised an exception: OSError: could not get source code\r\n```\r\n\r\n#### How can we reproduce this issue?\r\n\r\nInstall Red-Bot\r\ntry to add an action to warnings\r\nprofit?\n", "before_files": [{"content": "from copy import copy\nimport asyncio\nimport inspect\nimport discord\n\nfrom redbot.core import Config, checks, commands\nfrom redbot.core.i18n import Translator\nfrom redbot.core.utils.predicates import MessagePredicate\n\n_ = Translator(\"Warnings\", __file__)\n\n\nasync def warning_points_add_check(\n    config: Config, ctx: commands.Context, user: discord.Member, points: int\n):\n    \"\"\"Handles any action that needs to be taken or not based on the points\"\"\"\n    guild = ctx.guild\n    guild_settings = config.guild(guild)\n    act = {}\n    async with guild_settings.actions() as registered_actions:\n        for a in registered_actions:\n            # Actions are sorted in decreasing order of points.\n            # The first action we find where the user is above the threshold will be the\n            # highest action we can take.\n            if points >= a[\"points\"]:\n                act = a\n                break\n    if act and act[\"exceed_command\"] is not None:  # some action needs to be taken\n        await create_and_invoke_context(ctx, act[\"exceed_command\"], user)\n\n\nasync def warning_points_remove_check(\n    config: Config, ctx: commands.Context, user: discord.Member, points: int\n):\n    guild = ctx.guild\n    guild_settings = config.guild(guild)\n    act = {}\n    async with guild_settings.actions() as registered_actions:\n        for a in registered_actions:\n            if points >= a[\"points\"]:\n                act = a\n            else:\n                break\n    if act and act[\"drop_command\"] is not None:  # some action needs to be taken\n        await create_and_invoke_context(ctx, act[\"drop_command\"], user)\n\n\nasync def create_and_invoke_context(\n    realctx: commands.Context, command_str: str, user: discord.Member\n):\n    m = copy(realctx.message)\n    m.content = command_str.format(user=user.mention, prefix=realctx.prefix)\n    fctx = await realctx.bot.get_context(m, cls=commands.Context)\n    try:\n        await realctx.bot.invoke(fctx)\n    except (commands.CheckFailure, commands.CommandOnCooldown):\n        await fctx.reinvoke()\n\n\ndef get_command_from_input(bot, userinput: str):\n    com = None\n    orig = userinput\n    while com is None:\n        com = bot.get_command(userinput)\n        if com is None:\n            userinput = \" \".join(userinput.split(\" \")[:-1])\n        if len(userinput) == 0:\n            break\n    if com is None:\n        return None, _(\"I could not find a command from that input!\")\n\n    check_str = inspect.getsource(checks.is_owner)\n    if any(inspect.getsource(x) in check_str for x in com.checks):\n        # command the user specified has the is_owner check\n        return (\n            None,\n            _(\"That command requires bot owner. I can't allow you to use that for an action\"),\n        )\n    return \"{prefix}\" + orig, None\n\n\nasync def get_command_for_exceeded_points(ctx: commands.Context):\n    \"\"\"Gets the command to be executed when the user is at or exceeding\n    the points threshold for the action\"\"\"\n    await ctx.send(\n        _(\n            \"Enter the command to be run when the user **exceeds the points for \"\n            \"this action to occur.**\\n**If you do not wish to have a command run, enter** \"\n            \"`none`.\\n\\nEnter it exactly as you would if you were \"\n            \"actually trying to run the command, except don't put a prefix and \"\n            \"use `{user}` in place of any user/member arguments\\n\\n\"\n            \"WARNING: The command entered will be run without regard to checks or cooldowns. \"\n            \"Commands requiring bot owner are not allowed for security reasons.\\n\\n\"\n            \"Please wait 15 seconds before entering your response.\"\n        )\n    )\n    await asyncio.sleep(15)\n\n    await ctx.send(_(\"You may enter your response now.\"))\n\n    try:\n        msg = await ctx.bot.wait_for(\n            \"message\", check=MessagePredicate.same_context(ctx), timeout=30\n        )\n    except asyncio.TimeoutError:\n        return None\n    else:\n        if msg.content == \"none\":\n            return None\n\n    command, m = get_command_from_input(ctx.bot, msg.content)\n    if command is None:\n        await ctx.send(m)\n        return None\n\n    return command\n\n\nasync def get_command_for_dropping_points(ctx: commands.Context):\n    \"\"\"\n    Gets the command to be executed when the user drops below the points\n    threshold\n\n    This is intended to be used for reversal of the action that was executed\n    when the user exceeded the threshold\n    \"\"\"\n    await ctx.send(\n        _(\n            \"Enter the command to be run when the user **returns to a value below \"\n            \"the points for this action to occur.** Please note that this is \"\n            \"intended to be used for reversal of the action taken when the user \"\n            \"exceeded the action's point value.\\n**If you do not wish to have a command run \"\n            \"on dropping points, enter** `none`.\\n\\nEnter it exactly as you would \"\n            \"if you were actually trying to run the command, except don't put a prefix \"\n            \"and use `{user}` in place of any user/member arguments\\n\\n\"\n            \"WARNING: The command entered will be run without regard to checks or cooldowns. \"\n            \"Commands requiring bot owner are not allowed for security reasons.\\n\\n\"\n            \"Please wait 15 seconds before entering your response.\"\n        )\n    )\n    await asyncio.sleep(15)\n\n    await ctx.send(_(\"You may enter your response now.\"))\n\n    try:\n        msg = await ctx.bot.wait_for(\n            \"message\", check=MessagePredicate.same_context(ctx), timeout=30\n        )\n    except asyncio.TimeoutError:\n        return None\n    else:\n        if msg.content == \"none\":\n            return None\n    command, m = get_command_from_input(ctx.bot, msg.content)\n    if command is None:\n        await ctx.send(m)\n        return None\n\n    return command\n", "path": "redbot/cogs/warnings/helpers.py"}], "after_files": [{"content": "from copy import copy\nimport asyncio\nimport discord\n\nfrom redbot.core import Config, checks, commands\nfrom redbot.core.commands.requires import PrivilegeLevel\nfrom redbot.core.i18n import Translator\nfrom redbot.core.utils.predicates import MessagePredicate\n\n_ = Translator(\"Warnings\", __file__)\n\n\nasync def warning_points_add_check(\n    config: Config, ctx: commands.Context, user: discord.Member, points: int\n):\n    \"\"\"Handles any action that needs to be taken or not based on the points\"\"\"\n    guild = ctx.guild\n    guild_settings = config.guild(guild)\n    act = {}\n    async with guild_settings.actions() as registered_actions:\n        for a in registered_actions:\n            # Actions are sorted in decreasing order of points.\n            # The first action we find where the user is above the threshold will be the\n            # highest action we can take.\n            if points >= a[\"points\"]:\n                act = a\n                break\n    if act and act[\"exceed_command\"] is not None:  # some action needs to be taken\n        await create_and_invoke_context(ctx, act[\"exceed_command\"], user)\n\n\nasync def warning_points_remove_check(\n    config: Config, ctx: commands.Context, user: discord.Member, points: int\n):\n    guild = ctx.guild\n    guild_settings = config.guild(guild)\n    act = {}\n    async with guild_settings.actions() as registered_actions:\n        for a in registered_actions:\n            if points >= a[\"points\"]:\n                act = a\n            else:\n                break\n    if act and act[\"drop_command\"] is not None:  # some action needs to be taken\n        await create_and_invoke_context(ctx, act[\"drop_command\"], user)\n\n\nasync def create_and_invoke_context(\n    realctx: commands.Context, command_str: str, user: discord.Member\n):\n    m = copy(realctx.message)\n    m.content = command_str.format(user=user.mention, prefix=realctx.prefix)\n    fctx = await realctx.bot.get_context(m, cls=commands.Context)\n    try:\n        await realctx.bot.invoke(fctx)\n    except (commands.CheckFailure, commands.CommandOnCooldown):\n        # reinvoke bypasses checks and we don't want to run bot owner only commands here\n        if fctx.command.requires.privilege_level < PrivilegeLevel.BOT_OWNER:\n            await fctx.reinvoke()\n\n\ndef get_command_from_input(bot, userinput: str):\n    com = None\n    orig = userinput\n    while com is None:\n        com = bot.get_command(userinput)\n        if com is None:\n            userinput = \" \".join(userinput.split(\" \")[:-1])\n        if len(userinput) == 0:\n            break\n    if com is None:\n        return None, _(\"I could not find a command from that input!\")\n\n    if com.requires.privilege_level >= PrivilegeLevel.BOT_OWNER:\n        return (\n            None,\n            _(\"That command requires bot owner. I can't allow you to use that for an action\"),\n        )\n    return \"{prefix}\" + orig, None\n\n\nasync def get_command_for_exceeded_points(ctx: commands.Context):\n    \"\"\"Gets the command to be executed when the user is at or exceeding\n    the points threshold for the action\"\"\"\n    await ctx.send(\n        _(\n            \"Enter the command to be run when the user **exceeds the points for \"\n            \"this action to occur.**\\n**If you do not wish to have a command run, enter** \"\n            \"`none`.\\n\\nEnter it exactly as you would if you were \"\n            \"actually trying to run the command, except don't put a prefix and \"\n            \"use `{user}` in place of any user/member arguments\\n\\n\"\n            \"WARNING: The command entered will be run without regard to checks or cooldowns. \"\n            \"Commands requiring bot owner are not allowed for security reasons.\\n\\n\"\n            \"Please wait 15 seconds before entering your response.\"\n        )\n    )\n    await asyncio.sleep(15)\n\n    await ctx.send(_(\"You may enter your response now.\"))\n\n    try:\n        msg = await ctx.bot.wait_for(\n            \"message\", check=MessagePredicate.same_context(ctx), timeout=30\n        )\n    except asyncio.TimeoutError:\n        return None\n    else:\n        if msg.content == \"none\":\n            return None\n\n    command, m = get_command_from_input(ctx.bot, msg.content)\n    if command is None:\n        await ctx.send(m)\n        return None\n\n    return command\n\n\nasync def get_command_for_dropping_points(ctx: commands.Context):\n    \"\"\"\n    Gets the command to be executed when the user drops below the points\n    threshold\n\n    This is intended to be used for reversal of the action that was executed\n    when the user exceeded the threshold\n    \"\"\"\n    await ctx.send(\n        _(\n            \"Enter the command to be run when the user **returns to a value below \"\n            \"the points for this action to occur.** Please note that this is \"\n            \"intended to be used for reversal of the action taken when the user \"\n            \"exceeded the action's point value.\\n**If you do not wish to have a command run \"\n            \"on dropping points, enter** `none`.\\n\\nEnter it exactly as you would \"\n            \"if you were actually trying to run the command, except don't put a prefix \"\n            \"and use `{user}` in place of any user/member arguments\\n\\n\"\n            \"WARNING: The command entered will be run without regard to checks or cooldowns. \"\n            \"Commands requiring bot owner are not allowed for security reasons.\\n\\n\"\n            \"Please wait 15 seconds before entering your response.\"\n        )\n    )\n    await asyncio.sleep(15)\n\n    await ctx.send(_(\"You may enter your response now.\"))\n\n    try:\n        msg = await ctx.bot.wait_for(\n            \"message\", check=MessagePredicate.same_context(ctx), timeout=30\n        )\n    except asyncio.TimeoutError:\n        return None\n    else:\n        if msg.content == \"none\":\n            return None\n    command, m = get_command_from_input(ctx.bot, msg.content)\n    if command is None:\n        await ctx.send(m)\n        return None\n\n    return command\n", "path": "redbot/cogs/warnings/helpers.py"}]}