I am trying to get the membercount of my server in my Discord bot's status - discord.js

Title - I don't have much experience and don't know where to start.
I have looked at many examples which haven't proved to be helpful - any help/suggestions welcome.

What you're looking for is <guild>.memberCount, which returns the number of your total members.
Docs for it are found here: https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=memberCount

var memberCount = guild.members.filter(member => !member.user.bot).size;
Read the documentation here. (Thanks Squiddleton)
I started programming Discord bots just a few months back, quite intriguing.
As for beginners, I would suggest going through this tutorial just for a headstart and then taking off yourself after learning the basics of discord.js and node.js.
If you face any issues while doing the same, you can ask your questions on Stack Overflow or search it on Google - you will find a lot of questions directly on the web.
The only reason why I wouldn't suggest Youtube tutorials for making Discord bots or programming anything is that it starts to turn into a habit and suppresses our natural instincts of discovering things. And trust me, discovering things yourself helps you a lot in the long run.
Even if you direly need to watch a video tutorial, try to pick up the basics from it and discover things, it's a lot more fun and the experience gained is incredible.

Related

Can Discord automatically unfurl links from bots? If so, how?

Discord seems to be quite good (if a bit capricious) about unfurling links that a user posts in a channel, and also seems to be quite keen to support developers writing bots that act much like helpful users.
It's a bit weird then that it doesn't seem possible for links posted by bots to be unfurled in the same way.
I'm using this library https://github.com/andrejbauer/slack-to-discord to copy over channels from a free Slack instance we are abandoning in favor of Discord, but wish there was some way for unfurling to be done on the links users have previously posted. As far as I can see this is a historical shortcoming, Discord isn't interested in this working and there questions stretching back years and no answers.
The closest I can see is individual users attempting to do the unfurl links for their bots themselves, but that's really not a great choice and highly fragile IMHO.
Thanks if you have any clues for me to follow or I've somehow misjudged the current state of play and you have better information.
I don't believe discord supports stuff like that, and of course it's a pain to do anything manually, but I don't think it's possible to do this yet.

Messenger bot that reacts to all messages

I am working on a messenger bot for a group, that reacts to all messages that people type, unfortunately I don't have much experience with the messenger API, so I can't do it on my own. How can I do that?
There are not enough details to help you with your question
Start with the article that helps with process understanding, for
example:
Facebook Bots for fun and profit
Explore the official Facebook API documentation
Choose methods you would like to implement
Using programming language you know, try to implement this methods step-by-step, also you can find some working examples on GitHub
While having issues, try to find answers here on Stackoverflow, or google it - most of your questions are already solved by somebody
Good luck with your bot!

Ai Assistant programming guidance needed

Can any one tell me or guide me in programming an ai Assistant something like Jarvis or Google Assistant etc which has both online and offline voice recognition capability.
I am new to Ai so I tried many tuorials and all still not able to understand or build one. Also don't know where to start and how to start please any help I really need help.
To be frank, natural language processing is one of the most complex and technically difficult fields in computer science. so if you want to make your own version of google assistant, it would help to have an advanced degree in AI, a million dollars in research funding and your own team of engineers.
That being said, a chatbot makes for a really fun hobby project. For now, try not to worry about online and offline voice recognition capability. Make a text-based chatbot that handles basic conversation. You can always add more capability later, and you'll probably have your bearings by then and know what to do.
A good place may be microsoft's new bot framework. I've never used it, myself, but its goal is to take some of the technologies behind the likes of Google Assistant and Jarvis, and to make them available for the everyday developer. It seems to fit your use-case, and as a microsoft product, it'll (probably) have some documentation or tutorials for you to get started.
There are a couple of options to get started.
First off, try to build a
bot using C# for native windows
applications. Microsoft has great documentation for the same, and there are a couple of great tutorials on YouTube for the same.
You can also try
api.ai
to build a bot. It's a bit less hands on, but a good way to get started.
To really try doing everything yourself, try learning a bot of machine learning first. Google has great YouTube tutorials for the same.
Try:
C# bot on windows
Google machine learning
The best choice to start is api.ai. It is simple to learn and integrate, and have a good response time. I tried most of the chatbot engines, apply to the natural language by phone to build voice assistants (Voximal). An important factor in this case is the response time. If you plan to integrate a lot of complex datas the reponse time will increase, and remember that you need to add the time duration of the SpeechToText and TextToSpeech too...
Use my project as an inspiration, is a personal A.I. assistant that is running on Windows 10/11(maybe even 8, not tested). It uses Tokenization and content analysis and association with set parameters for natural language processing and offline and online speech recognition for speech recognition. It can search content on Amazon, Google, Google Images, Google News, Netflix, Wikipedia and eBay. It can open and close multiple applications and it can also navigate in the settings menu on windows on any page or sub-section.
The project is here: https://github.com/CSharpTeoMan911/Eva

Angular-Fullstack Generator: How to create a persistent file upload using the boilerplate?

Thank you for reading this post.
As a newcomer to the programming community, I have what I believe to be a fairly easy question.
How do you implement a file upload (particularly images) using the MEAN stack (yeoman angular-fullstack generator in particular)? An explanation using the yeoman angular-fullstack boilerplate would be appreciated.
In particular, could you please make a step-by-step explanation. This is not recorded anywhere on the internet, so your help will be recognized and appreciated! :-)
While there are numerous explanations out there, those explanations always answer a particular user's question (as do many other questions/answers) and are not applicable to general use cases. Those explanations typically require one to be able to parse through numerous lines of irrelevant code, in order to absorb the information that's relevant. As such, a "noob" is not able to utilize the part of the code that is applicable to him/her. That is why I'm asking for an explanation using the boilerplate of a generator, so that myself and others may use this information -- now and in the future.
Using search engines and research, I have come across the predominate answer that ng-file-upload and multer can accomplish this task. However, there is no rudimentary explanation of how this used implemented within a MEAN stack together (particularly, angular-fullstack -- the predominate MEAN stack implementation at this time).
Today, any general non-static website requires a file-upload implementation, and it seems extremely odd that there is very little documentation on this issue. I've read numerous O'Reilly books on MongoDB, but this issue is not addressed. Images and Videos are essential to commercial-grade websites, and these topics should be documented in a way that is digestible for newcomers to MEAN programming.
Thank you for your time, and I appreciate any and all helpful answers and comments.
you can use my code which is MEAN project for image upload
https://github.com/RohitShedage/image-upload

CakePHP: Private Training/Course 101? Any suggestions

I know that this question is not directly related to programming in CakePHP, so I apologies in advance for that.
Is there a website/organization where I can pay for a 101 training in CakePHP with an experienced programmer who can take me from the very basics and lead through the development my first application. Teach me best practices, answering questions, offering guidance etc. Kind of like a supervisor/mentor over my work.
Please do not answer with: ‘Read the CakePHP book’ because… I am doing that, but still I have many other questions related to programing.
CakeDC does CakePHP training:
http://www.cakedc.com/training
"Additionally, if you'd prefer to have a more tailored training session
for you or your team we can provide specific training sessions as part
of our consultancy services. Please contact us for more information."
Update:
I contacted them awhile back with an inquiry to training our team, and never heard back. Not sure if they're no longer doing it, or what.

Resources