From ac6e55353a7b1fea6619b5aef32506711350a7d2 Mon Sep 17 00:00:00 2001
From: Rapptz <rapptz@gmail.com>
Date: Sat, 23 Feb 2019 05:31:05 -0500
Subject: [PATCH] [commands] Copy on_error handlers in Command.copy

This fixes the issue of error handlers not applying.
---
 discord/ext/commands/core.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 4ac010e5c..782b19ab0 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -270,6 +270,10 @@ class Command(_BaseCommand):
         ret = self.__class__(self.callback, **self.__original_kwargs__)
         ret._before_invoke = self._before_invoke
         ret._after_invoke = self._after_invoke
+        try:
+            ret.on_error = self.on_error
+        except AttributeError:
+            pass
         return ret
 
     def _update_copy(self, kwargs):