尝试设置此错误。当我运行它时,出现此错误。我能做什么? 代码为here 错误消息:
File "C:\Users\meganano202\Desktop\PokeCord-master\var_secrets.py", line 4, in <module>
CLIENT_SECRET = yWW55ovf6-KxETrB1v18x_-QLUJaoaam #Discord given
NameError: name 'yWW55ovf6' is not defined
我尝试更改密钥,但总是说未定义密钥
from var_secrets import *
import os
import json
import pickle
import random
import asyncio
# api #
import discord
from imgurpython import ImgurClient
# DISCORD VARS #
#client = discord.Client()
BOT_PREFIX = ";"
CHANNEL_IDs = ("449281327988998156")
# PYTHON VALS #
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
# Globals #
imgr_client = ImgurClient(imgr_client_id, imgr_client_secret)
# Image Vars #
white = (255,255,255,255)
black = (0, 0, 0, 255)
,此代码将其打开以获取信息:
MASTER_ID = None #Discord ID
CLIENT_ID = None #Discord given
CLIENT_SECRET = None #Discord given
TOKEN = None #Discord given
imgr_client_id = None #IMGR Given
imgr_client_secret = None #IMGR Given
答案 0 :(得分:1)
如@John Gordon所述
在var_secrets.py
文件中,您需要在值两边加上引号
CLIENT_SECRET = "yWW55ovf6-KxETrB1v18x_-QLUJaoaam".