Closed THETEMLACK closed 4 years ago
Hey, I assume you put the configuration information in this file: Config.Example.ts Rename Config.Example.ts to Config.ts.
I should also mention that I will be expanding on the setup information a little later. That isn't priority by any means for me, though.
Thanks.
Thank you so much! But I still receive this error;
ReferenceError: MongoParseError: Invalid connection string at Zero.login (file path)
@THETEMLACK Hello again, I assume you didn't set up the Mongo database yet. I suggest making a free account here (https://www.mongodb.com/). Let me know when you do; I can try to help you set things up.
Hellooo, yes, I have created an account.
Hey, Excellent work. I'm not too sure what you are seeing, but begin by making a new Cluster.
Select one of the free tiers (preferably one that is closest to you) and give your cluster a decent name.
Once you create your cluster, go to Database Access and click "Add New Database User." Provide a good username and password.
Next, go to Network Access and add the following IP address: 0.0.0.0
Sorry if these instructions are vague. I'm not too sure what you are seeing (since I haven't used the service in a while). Let me know if you have any questions.
Hey,
I have just finished it. Do I just run the bot again? And it still comes up with this error; ReferenceError: MongoParseError: Invalid connection string at Zero.login
Thank you, I hope am not bothering you :I
Hello, Make sure you put your connection string into the configuration file. You'll see something like this.
dbURL: "",
dbName: "",
userCollectionName: "",
guildCollectionName: "",
botCollectionName: ""
dbURL is where you put the connection string. To get that, go to the Clusters tab and click here (arrow):
It will look something like this: mongodb+srv://USERNAME:PASSWORD@url/
dbName is simply the name of the database. Name it something relevant, preferably what you will name the bot.
userCollectionName is the name of the user collection. Each Discord account, when they verify with the bot, gets an entry in the collection (the bot operates under the "1 Discord account, 1 person" motto). Later (maybe a week) I will add a way for people to add alt accounts.
guildCollectionName is the name of the guild collection. Each server will get one entry.
botCollectionName is the name of the bot settings collection. This is currently unused.
For the collections above, give it a useful and meaningful name.
Hi,
Even with that all filled in, for some reason I obtain this;
ReferenceError: MongoNetworkError: failed to connect to server [cluster0-shard-00-00-za1lc.mongodb.net:27017] on first connect [MongoError: bad auth Authentication failed.
Hello, Interesting. I've had that issue a few times. Can you send me your configuration settings (obviously omit your token and username/password for the dbURL).
Thanks.
Currently it is this, I have probably done something wrong: export const BotConfiguration: IConfigurationSettings = PRODUCTION_BOT ? { token: "---", dbURL: "---", dbName: "Cluster0", userCollectionName: "name3", guildCollectionName: "name2", botCollectionName: "name", botOwners: [] } : { token: "----", dbURL: "---", dbName: "Cluster0", userCollectionName: "name3", guildCollectionName: "name2", botCollectionName: "name", botOwners: [] };
Hey,
Thanks for your quick response -- really helps out here since I lack patience. Jokes aside, I think everything looks okay. Does your password have any symbols?
And speaking of which, are you sure you are using the credentials from the "Database Access?" The credentials you use to access your MongoDB account is NOT the same as the credentials for the Database Access user you created.
Thanks.
Hello, I do not have any symbols in the password, and I have used Database Access credentials.
Hey, Can you send me your DB URL then? Omit your username and password; for example, if this is your URL:
mongodb+srv://username:password@cluster0-xxzan.mongodb.net/
Replace it with
mongodb+srv://----:----@cluster0-xxzan.mongodb.net/
Otherwise, copy and paste it exactly. Thanks.
My dbURL is : mongodb+srv:/----:----@cluster0-za1lc.mongodb.net/test
Hey,
Remove /test
and try again (i.e. it should look like mongodb+srv:/----:----@cluster0-za1lc.mongodb.net
)
Thanks.
Hello,
Thank you so much, it really worked. By this point I am probably annoying you haha, but how do you allocate the bot a channel, because I get this now when I attempt to start an AFK check,
An AFK check could not be started because there was an issue finding the channel.
Hey, No problem, you're not annoying me at all. First, can you give me your bot's invite? I'll put the bot in my friend's emoji Discord server (so emojis will render properly without any errors).
You will need to configure the bot to work with your server. Do so by running ;configsection modify
and typing 1
. Everything else should be self-explanatory.
Thanks.
Heya,
Could you clarify what you mean by the bot's invite? Is it a link I can obtain?
Hey, Correct, it is. It's the link that you used to invite the bot to your server.
Thanks~
Hey, I invited the bot to my friend's emoji servers; emojis should work. Is there anything else I can help you with?
If I may ask, what are you using this bot for and what is your IGN? (I'm curious as to how an open-source project is helping the community).
Thanks!
Hello,
Thank you SO much! You've been so friendly and helpful, and thankfully no there is no other problems as of now.
My IGN is THETEMLACK, and basically I am just attempting to use your bot to organise some raids in an upcoming guild. A lot of my friends will be joining so having a system like this is amazing.
Again, thank you soooo much! Sorry for any inconveniences. Have an amazing day! :)
Hey, No problem whatsoever. If you ever need any help or support, please let me know!
And I'm glad to hear that you are using the bot for your guild! I will update the README soon, but please don't use the bot to start a new server for the public (think Pub Halls/Shats, Dungeoneer/Realm Clearing-public). Using it for the guild is fine! :)
I will be closing this issue in about 15 minutes. Feel free to leave any comments or questions. If you like this project, please leave a star (top right). And if you'd like, maybe you can invite me to your server? :)
Heya,
I just discovered your bot and although the guide you wrote is really nice, I still haven't been able to run to bot. It would be amazing if you could help with how to truly set it up, like with the steps, I understand if it's troubling or annoying.
Just for reference this is the issue (it occurs when I try run it):
src/Events/MessageEvent.ts:3:49 - error TS2307: Cannot find module '../Configuration/Config' or its corresponding type declarations.
3 import { DefaultPrefix, BotConfiguration } from "../Configuration/Config";
src/index.ts:2:34 - error TS2307: Cannot find module './Configuration/Config' or its corresponding type declarations.
2 import { BotConfiguration } from "./Configuration/Config";