Open Antriksh006 opened 3 years ago
Go to Terminal/Command Prompt and type pip3 install dotenv. Hope it helped! Chris Wang
On Mon, Sep 21, 2020 at 9:27 AM Antriksh006 notifications@github.com wrote:
Hi NotOcra22 , I am learning from your wonderful course, But at the Lesson 7 I coded what you added but when I runned it showed me Dotenv module not found. I did all the steps correctly in the cmd but still its not going kindly help. @NotOrca22 https://github.com/NotOrca22 @seadragonwang https://github.com/seadragonwang
`import discord from discord.ext import commands from discord.ext.commands import has_permissions from random import randint, random import mysql.connector from dotenv import load_dotenv import os
load_dotenv()
TOKEN = os.getenv("My Token was here") client = commands.Bot(command_prefix = '?')
HOST = os.getenv("HOST") USERNAME = os.getenv("USERNAME") PASSWORD = os.getenv("PASSWORD") DATABASE = os.getenv("DATABASE") connection = mysql.connector.connect( host=HOST, user=USERNAME, password=PASSWORD, database=DATABASE )
@client.event async def on_ready(): print('Bot is Ready.')
client.run(TOKEN) [image: 2020-09-21] https://user-images.githubusercontent.com/71648201/93772268-44290e00-fc3c-11ea-9d12-c1428df87b3d.png
`
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NotOrca22/discord-bot/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7EUM2QLYCLNTPSAULZE6LSG5IE5ANCNFSM4RURDACQ .
Now this error is coming
Could you scroll down? Chris Wang
On Mon, Sep 21, 2020 at 10:35 AM Antriksh006 notifications@github.com wrote:
Go to Terminal/Command Prompt and type pip3 install dotenv. Hope it helped! Chris Wang … <#m-7694281777923912414> On Mon, Sep 21, 2020 at 9:27 AM Antriksh006 @.***> wrote: Hi NotOcra22 , I am learning from your wonderful course, But at the Lesson 7 I coded what you added but when I runned it showed me Dotenv module not found. I did all the steps correctly in the cmd but still its not going kindly help. @NotOrca22 https://github.com/NotOrca22 https://github.com/NotOrca22 @seadragonwang https://github.com/seadragonwang https://github.com/seadragonwang import discord from discord.ext import commands from discord.ext.commands import has_permissions from random import randint, random import mysql.connector from dotenv import load_dotenv import os load_dotenv() TOKEN = os.getenv("My Token was here") client = commands.Bot(command_prefix = '?') HOST = os.getenv("HOST") USERNAME = os.getenv("USERNAME") PASSWORD = os.getenv("PASSWORD") DATABASE = os.getenv("DATABASE") connection = mysql.connector.connect( host=HOST, user=USERNAME, password=PASSWORD, database=DATABASE ) @client.event async def on_ready(): print('Bot is Ready.') client.run(TOKEN) [image: 2020-09-21] < https://user-images.githubusercontent.com/71648201/93772268-44290e00-fc3c-11ea-9d12-c1428df87b3d.png> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#14 https://github.com/NotOrca22/discord-bot/issues/14>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7EUM2QLYCLNTPSAULZE6LSG5IE5ANCNFSM4RURDACQ .
[image: 2020-09-21 (1)] https://user-images.githubusercontent.com/71648201/93780361-af2b1280-fc45-11ea-95b9-c3b7e87f4c00.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NotOrca22/discord-bot/issues/14#issuecomment-696156533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7EUM7RWVTDZNDGR3S3QHLSG5QBXANCNFSM4RURDACQ .
Yup i could.
and i want to ask one more thing, are you doing this dotenv and all that stuff for hosting the bot or for any other commands
I haven't heard anything from you since days about my issue. Hope you reply me ASAP
Try the code. If it w0rks, tell me.
On Thu, Sep 24, 2020 at 11:21 PM Antriksh006 notifications@github.com wrote:
I haven't heard anything from you since days about my issue. Hope you reply me ASAP
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NotOrca22/discord-bot/issues/14#issuecomment-698698197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7EUM4ATYZ4U4DHX4KJU5DSHQEETANCNFSM4RURDACQ .
Which code i am not able to see any
The bot's code Chris Wang
On Fri, Sep 25, 2020 at 11:41 AM Antriksh006 notifications@github.com wrote:
Which code i am not able to see any
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NotOrca22/discord-bot/issues/14#issuecomment-699001958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7EUM5NS22DOTBHSLTWSATSHS22RANCNFSM4RURDACQ .
Brother what is this bot's code, i am not able to understand what you said
Hi NotOcra22 , I am learning from your wonderful course, But at the Lesson 7 I coded what you added but when I runned it showed me Dotenv module not found. I did all the steps correctly in the cmd but still its not going kindly help. @NotOrca22 @seadragonwang
`import discord from discord.ext import commands from discord.ext.commands import has_permissions from random import randint, random import mysql.connector from dotenv import load_dotenv import os
load_dotenv()
TOKEN = os.getenv("My Token was here") client = commands.Bot(command_prefix = '?')
HOST = os.getenv("HOST") USERNAME = os.getenv("USERNAME") PASSWORD = os.getenv("PASSWORD") DATABASE = os.getenv("DATABASE") connection = mysql.connector.connect( host=HOST, user=USERNAME, password=PASSWORD, database=DATABASE )
@client.event async def on_ready(): print('Bot is Ready.')
client.run(TOKEN)`
`