Jump to content




DisCCord | A Discord client for CC


25 replies to this topic

#1 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 13 January 2017 - 09:34 PM

Welcome to DisCCord!

What is this?
This program is using a bot I wrote for discord (currently running on my openshift account) to route messages from cc<->discord. It is possible to "connect" to every server the bot is a member of, and you can control the available channels by setting the "sendMessages" permision for specific channels (no permission -> not visible in the client).

Here's a GIF showing you how it looks like:
Posted Image


Installing the client
pastebin get BYf2GBWk disccord

Adding the bot to your server
just go to this link, select your server and add the bot.

Planned features
  • add (limited) support for emoji, so they are not displayed as "?"
Bugs
  • Some characters look weird.
Source
You can find everything here.

Credits
Hbomb_79 for Titanium and it's awesome packager
abalabahaha for writing Eris.js

Edited by H4X0RZ, 08 February 2017 - 10:54 PM.


#2 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 16 January 2017 - 10:11 PM

Unfortunately I have to announce that the bot is down for now. It was running on my OpenShift v3 account which expired someday ago. If anyone want's to host the bot for me, or if there is some other free option available, please inform me. (I already tried OpenShift v2, which only starts the webserver and won't connect to Discord)

#3 SquidDev

  • Members
  • 1,323 posts
  • LocationDoes anyone put something serious here?

Posted 16 January 2017 - 10:52 PM

Whilst I realise it would be a fair bit of work, would it be possible to use Discord's API on the Lua side instead? Though people would have to create their own OAuth2 applications as obviously you don't want to be sharing you secret with everyone. I don't know how your current implementation works, but it looks like you can also post "as" that user (instead of through a bot) which might be preferred.

#4 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 17 January 2017 - 12:49 PM

It might be possible to use the API, I haven't tried it yet.
You can easily extract your own OAuth token from your client and then run your own "bot" instead.

The current implementation is written in NodeJS. It is a simple bot which just connects to discord and opens a webserver next to it. Then it listens for specific calls to that webserver and commands the bot to do stuff

#5 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 20 January 2017 - 07:29 AM

Awesome. I will work on alpha.7 of Titanium ASAP so you can use the new text wrapping and get rid of the horizontal scrollbars.

Nice to see someone using Titanium for something that is actually cool!

#6 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 21 January 2017 - 12:05 AM

View PostHbomb_79, on 20 January 2017 - 07:29 AM, said:

Awesome. I will work on alpha.7 of Titanium ASAP so you can use the new text wrapping and get rid of the horizontal scrollbars.

Nice to see someone using Titanium for something that is actually cool!

It's not usable right now though :/
The bot is down and I have to find some way to get it working somehow. If you know any free nodejs hoster I would really appreciate it :D

#7 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 23 January 2017 - 01:27 AM

View PostH4X0RZ, on 21 January 2017 - 12:05 AM, said:

It's not usable right now though :/
The bot is down and I have to find some way to get it working somehow. If you know any free nodejs hoster I would really appreciate it :D

That sucks. Titanium alpha 7 is out, providing the text wrapping you wanted. Although, I cannot help with the hosting issue - sorry.

Edited by Hbomb_79, 23 January 2017 - 01:28 AM.


#8 LoganDark2

  • Members
  • 86 posts
  • LocationYes

Posted 02 February 2017 - 07:49 AM

Awwwww I wanted to make a discord client. I make bots for a living anyway lmao

#9 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 06 February 2017 - 07:59 PM

DisCCord is back! I finally managed to renew my Openshift account. The bot is back up, and I fixed some problem with the DisCCord package which made it unable to run on other cc machines (it tries to run "titanium", which is a link to the titanium package, but the Titanium Packager doesn't account for these links, so I had to use the absolute path)

Also, the bot has some small commands built-in which you can use when you are not using it through DisCCord. Just say "+miso help" at any time and let the magic happen.

#10 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 07 February 2017 - 02:14 AM

View PostH4X0RZ, on 06 February 2017 - 07:59 PM, said:

but the Titanium Packager doesn't account for these links, so I had to use the absolute path)

Not sure what you mean. The Titanium Packager will automatically generate a link to the absolute path that is used by the Titanium Package Manager (TPM). See line 627 of your pastebin, you will notice the Titanium installation being started. Ensure Titanium is not loaded before though, if it is the package won't reload it.

Depending on how you package the application, you won't have to load Titanium yourself, it will be loaded into the programs environment automatically.

(This line shouldn't be needed if you use it properly.)

Edited by Hbomb_79, 07 February 2017 - 03:03 AM.


#11 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 07 February 2017 - 08:05 AM

Oh, it loads it automatically? That makes way too much sense.

I'll update my codev ASAP.

#12 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 08 February 2017 - 10:35 PM

Just a small update. I rewrote DisCCord in Moonscript. Here's the source.

Installing still works the same.

I'm not sure if that increases or decreases the speed though.

Edited by H4X0RZ, 08 February 2017 - 10:55 PM.


#13 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 09 February 2017 - 07:09 AM

I really like the new look, awesome work as always.

#14 ItzMattie

  • Members
  • 12 posts
  • LocationOn Turtlenet.

Posted 02 December 2017 - 03:17 PM

View PostH4X0RZ, on 16 January 2017 - 10:11 PM, said:

Unfortunately I have to announce that the bot is down for now. It was running on my OpenShift v3 account which expired someday ago. If anyone want's to host the bot for me, or if there is some other free option available, please inform me. (I already tried OpenShift v2, which only starts the webserver and won't connect to Discord)
i can host your bot for ye

#15 SchnitzeltoastMC

  • Members
  • 4 posts

Posted 07 December 2017 - 02:01 PM

Seems to be a very cool Feature. To use it on our Server, I would like to invite you, hosting your bot on my vServer.

#16 LoganDark2

  • Members
  • 86 posts
  • LocationYes

Posted 15 January 2018 - 07:29 PM

I could let you host your bot on my (dedicated) server.
That's different than having me host it for you, because you'd be in full control of it (user account on my server)

Here's the specs:
Posted Image

And I think the uptime shows why this server can be trusted to keep services online 24/7.

Edited by LoganDark2, 25 January 2018 - 09:10 PM.


#17 jaredallard

  • Members
  • 124 posts
  • LocationSeattle, WA

Posted 09 February 2018 - 03:31 AM

View PostLoganDark2, on 15 January 2018 - 07:29 PM, said:

I could let you host your bot on my (dedicated) server.
That's different than having me host it for you, because you'd be in full control of it (user account on my server)

Here's the specs:
Posted Image

And I think the uptime shows why this server can be trusted to keep services online 24/7.

Not very secure though... then again, it *is* someone else's bot. I'd be much more interested in seeing this be able to be deployed per user. Make a Dockerfile for this and let users deploy their own bot on their own server / even heroku! Wouldn't trust using someone's random bot... but maybe that's just me.

View PostSquidDev, on 16 January 2017 - 10:52 PM, said:

Whilst I realise it would be a fair bit of work, would it be possible to use Discord's API on the Lua side instead? Though people would have to create their own OAuth2 applications as obviously you don't want to be sharing you secret with everyone. I don't know how your current implementation works, but it looks like you can also post "as" that user (instead of through a bot) which might be preferred.

That'd be even better, OAuth2 would totally work with the HTTP api as well. Sidenote, (insert wave emoji here) @SquidDev. Been a few years ;)

Edited by jaredallard, 09 February 2018 - 03:31 AM.


#18 LoganDark2

  • Members
  • 86 posts
  • LocationYes

Posted 09 February 2018 - 03:34 AM

View Postjaredallard, on 09 February 2018 - 03:31 AM, said:

View PostLoganDark2, on 15 January 2018 - 07:29 PM, said:

-snip-

Not very secure though... then again, it *is* someone else's bot. I'd be much more interested in seeing this be able to be deployed per user. Make a Dockerfile for this and let users deploy their own bot on their own server / even heroku! Wouldn't trust using someone's random bot... but maybe that's just me.

What's not secure, the bot, my server, what? And why would "it" being "someone else's bot" be significant?

#19 SquidDev

  • Members
  • 1,323 posts
  • LocationDoes anyone put something serious here?

Posted 09 February 2018 - 09:14 AM

View Postjaredallard, on 09 February 2018 - 03:31 AM, said:

That'd be even better, OAuth2 would totally work with the HTTP api as well. Sidenote, (insert wave emoji here) @SquidDev. Been a few years ;)
It might even be possible to use CC(Tweaks|: Tweaked)'s websockets, though that's less portable than normal HTTP. Hello again! Wow, it really has been a long time :). Good to see you!

Edited by SquidDev, 09 February 2018 - 09:14 AM.


#20 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 09 February 2018 - 12:31 PM

View PostSquidDev, on 09 February 2018 - 09:14 AM, said:

View Postjaredallard, on 09 February 2018 - 03:31 AM, said:

That'd be even better, OAuth2 would totally work with the HTTP api as well. Sidenote, (insert wave emoji here) @SquidDev. Been a few years ;)/>/>
It might even be possible to use CC(Tweaks|: Tweaked)'s websockets, though that's less portable than normal HTTP. Hello again! Wow, it really has been a long time :)/>/>. Good to see you!

I actually once wrote a partial lib using urn and CC:T websockets.

The problem with only using the HTTP API would be that you get ratelimited really fast; using the HTTP API in order to continuously fetch messages counts as abusing the API AFAIK.

Posting _as_ the user is also something I would rather not do. That counts as userbot which are being hunted right now.

Edited by H4X0RZ, 09 February 2018 - 12:33 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users