Adding error handling for modmail logging

pull/4/head
sgoudham 4 years ago
parent 60df656d9c
commit c99e605381

@ -3,7 +3,7 @@ import asyncio
import discord import discord
import mariadb import mariadb
from decouple import config from decouple import config
from discord import Embed from discord import Embed, DMChannel
from discord.ext import commands from discord.ext import commands
import db import db
@ -33,6 +33,10 @@ async def on_message(message):
if message.author.bot: if message.author.bot:
return return
if not isinstance(message.channel, DMChannel):
return
else:
# Set up the connection to the database # Set up the connection to the database
conn = db.connection() conn = db.connection()

Loading…
Cancel
Save