PYTHON Just started working with cogs in discord.py so I was copying my code around into cogs but one thing that worked before isn't working in a cog and I cannot figure out why. Code sample below.
sverify_index=0
sverify_msg_id=""
@commands.Cog.listener()
async def on_message(self, message):
if message.channel.id == 888529033405530183 and message.author.id != 887542628063780864:
global sverify_index, sverify_msg_id
sverify_index += 1
sverify_list = []
sverify_list.append(sverify_index)
Currently the error I am getting is
line 19, in on_message
sverify_index += 1
NameError: name 'sverify_index' is not defined
Please help.