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

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.

Related

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

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.

How to understand the differences of Web Frameworks, Databases, and Libraries?

Where I stand: I am a junior in college. I have a solid background in Java and C++. I've been coding websites in JavaScript, HTML, CSS, and PHP (using MySql databases) since middle school. I have only just uncovered the magical box filled with these mysterious "frameworks."
My Predicament: After reading in my spare time wikis, blogs, and StackOverflow questions week after week for the past few months, I feel that I am no closer to understanding the items in this ominous list and how they relate to one another.
Yeoman, Grunt, Linemanjs, Bower
Nodejs, Go, PHP
Mongodb, Couchdb, MySql
Angularjs, Ember, Backbone
Terms like: boilerplate, scaffolding, frameworks, etc...
What I am asking: I understand that explaining any one of the above would be a question too big for a single Stack Overflow question, but that's not what I'm looking for. What I am looking for is a guide that explains in-depth what each of these groups are used for and if/how they can be combined (ex: using Angularjs with Nodejs). I am happy with a link if an article already exists, but I have yet to find an article that covers all of the above.
El Fin: I love learning new languages (especially for the web), but right now I feel like I'm blinded, running around in circles like a chicken with its head cut off. A shove in the right direction would be great :)
I'll put this in as an answer to help clarify why this is too broad.
I think that the GREAT BIG point you are missing is that there are specific reasons someone chooses a particular framework or server environment when they start a project.
This is all dependent of a boatload of things that like budget, knowledge, availability, expected scope of the project, etc... It also may come down to, "I'm starting this new project, what is available in this work environment for me to use?"
Then you don't really get to choose. You get what you get.
So what's the best package of technologies to use? That SO depends on what you're doing.
Example: If you are building a simple site for a local store that just needs a few pages, and you want to keep your costs low. A simple LAMP solution would work fine. But if you want to design the next Facebook, even though the core of the system could be build using all LAMP (and it in fact IS), you will need MUCH more powerful servers, and MUCH better and more efficient coding. Not to mention a boatload of server space for both the site AND the database.
In many cases, when you see people pooling together what might be considered obscure technologies, all they really break down to are collections of libraries. It's like choosing JQuery over some other JS library that essentially does the same thing. One may be better than the other. But you go with what you are comfortable with.
So, when you are asking about how, why, and in which way, do people combine technologies together, there is no way to answer that at all. Other than to say, it's specific to their needs. And that's about it.
Reading articles that compare all these different things together will only give you an idea of what they are capable of, and what their limitations are. In the end, it's always a matter of opinion what is better. Otherwise we would all be coding with the same thing.
For my part, I prefer PHP over ASP. I prefer working straight out of a text editor than using an IDE or any MVC framework. I use jQuery where it's needed, but don't over use it.
But that's just me.
And I'm sure this still didn't answer your question.

Blog on Google App Engine for Java

I am considering to add a Blog on my GAE/J application and wondered what is the best way to do so.
Are there any implementations I can use?
Should I write something on my own?
I read about Microblog but it is written in python, I am not sure it will co-exists with my Java app.
Appreciate your thoughts.
While I don't know any implementations that you can use, this question is very broad and there are a lot of different things that you could do, and writing your own is one of them.
Just to begin with you could use the Blogger API to read the posts and present them in your app. By doing that you're able to add/modify/delete posts using the Blogger's UI and in your own app you will only present the posts. The only problem with this solution is regarding the comments, where you could implement your own (just to start somewhere) or include maybe the Facebook's Comments Box.
I did exactly that for the kiebdoj.com/blog/ and it saved me a lot of time for not implementing my own WYSIWYG editor or a post manager. That was written in Python, so I can't provide any examples, but in either case it wasn't written to work on it's own.

gae-boilerplate documentation

In my search for a good social login package for App Engine, I am giving gae-boilerplate a try. But I find there is no documentation except the readme file, which I think it is not enough at all.
I have many questions, among them:
Should the boilerplate be used as a library or download and modify as needed?
How should the boilerplate be updated?
What does each model do?
Where should my templates go?
Should I have a different routes file?
Should I derive my Handlers from BaseHandler?
In general, what things should I implement in my pages? For example, I found out that I have to include a csrf_token in all POST requests. It would have been nice to know this in advance, and the many other things that I'm having to find out along the way, and which I implement without being sure if I'm supposed to be doing that.
And some more...
My biggest problem is that Social login is not working, and I feel this boilerplate is a big monster with which I don't know where to start. To make things worse, it is hard to debug social auth from any machine that is not the production one. Thats why I'm desperately looking for some docs.
I have not found anything in SO, and I guess there must be more people in my situation. So, any pointers to documentation that could help to understand gae-boilerplate a little bit better would be very appreciated.
EDIT: I switched to gae-boilerplate in a site that I had previously working. Maybe most of my problems come from the way that I have tried to integrate gae-boilerplate and my existing site. As a result I have tried to treat gae-boilerplate as a library, and keep my own templates, handlers, static files and such.
Thank you guys!
EDIT 2: After trying other options, I have to say that I am very happy with gae-simpleauth. It works really well, and Alex's support is superb.
I will try to answer most of your questions below:
Should the boilerplate be used as a library or download and modify as needed?
You can modify it as needed based on your specific requirements.
How should the boilerplate be updated?
What do you mean?
What does each model do?
User and SocialUser are pretty self explanatory. LogVisit and LogEmail are used for auditing purposes.
Where should my templates go?
In the templates directory
Should I have a different routes file?
No, you can use the existing file for all your routes.
Should I derive my Handlers from BaseHandler?
It't not mandatory but I would recommend to do so. BaseHandler is very handy and provides a lot of good stuff.
In general, what things should I implement in my pages?
What exactly do you mean?
In general, you can use gae-boilerplate as a reference on top of which you will built your own project. Study the code step by step, try to figure out what is the purpose of each file and library used and how they work together. This way you will gain good knowledge of a lot of things like jinja templating, oauth2, etc.
Hope this helps.

how to get a smartclient example on the web?

I'm pretty much totally lost.. I've posted twice on the smartclient forums and gotten no help so maybe the people here are more friendly than their own staff. (it really bothers me but they appear to have the best software for what I'm trying to do)
I'm trying to wrap my head around how I would get one of their examples (the demo showcase ones which I have downloaded etc) on my web host, just to see how it works/play with it, but I couldn't find any forum guides or videos etc on this (documentation is really abysmal for people that don't speak code yet).
Is there some special back-end I need on my web host? Where can I go to figure out how to link the stuff together? Do I have to compile something using java.. etc.
I'm used to just editing stuff in notepad++, uploading it, and hitting refresh, but I'm guessing smartclient isn't that simple, or is it? (I'm just going to use it to make tables from excel spreadsheets that I can filter through, that's it, no fancy application).
Sincerely,
Mr. Totally Lost.
Everything is covered by the guide (page 6) : http://www.smartclient.com/docs/8.2/docs/SmartClient_Quick_Start_Guide.pdf
SmartClient embed everything needed, you will only need a valid JDK installation and the zip provided in their website.

Resources