GithubHelp home page GithubHelp logo

titanembeds / titan Goto Github PK

View Code? Open in Web Editor NEW
333.0 24.0 87.0 87.54 MB

Create Discord server widgets for websites of all sizes! A simple to setup process for end-users. Server members may view or send messages into an embedded Discord channel.

Home Page: https://titanembeds.com

License: GNU Affero General Public License v3.0

Python 46.08% CSS 6.64% JavaScript 21.76% Mako 0.07% Shell 0.42% Jinja 25.02%
discord webapp titan discord-bot chatbot embed widget discordpy flask discord-py discord-py-bot

titan's Introduction

Titan

Visit our website! https://titanembeds.com/ And get started right away!

There was a time when Discord doesn't support embedding the chat on a webpage. But with Titan, you can! It is as simple as 1, 2, 3!

  1. Invite the bot to your server (You must have "Manage Server" permissions)
  2. Configure the embed to your liking (toggling guest users, etc)
  3. Copy the iframe code and paste the line in your webpage!

Features

  • Guest users (a quick way to invite users who do not have a Discord account)
  • Moderation Features (Kick & ban users by IP addresses, toggling guest users)
  • Discord OAuth support. (Allows those who have a discord account to access the embed)
  • Responsive material design! (Thanks materializecss!!)

Installation

Would you like to run your own copy of Titan Embeds? There are two parts that integrate nicely together. The webapp (website) handles the frontend and communication with the database to retrieve server messages, etc. The discordbot (bot) handles the communcation between Discord's websockets and pushing out the data to the database for the webapp. Check out the respective folder for their installation instructions. Titan is written in Python and requires Python 3.6.8 at minimum to run.

Once you cloned the project, install the Python depends with pip install -r requirements.txt. Ensure that you are utilizing Python 3.6's pip.

If you happen to have a copy of Ubuntu on your server, you may head onto our Ansible Playbooks repository and perform a near-to-automatic installation of TitanEmbeds.

Storage installation

Database

To set up the database for it to work with the webapp and the discordbot, one must use alembic to migrate their databases to the current database state. To do so, please follow these instructions. PostgreSQL supports proper indexing and suitable for Titan needs. For this reason, Titan only supports using a PostgreSQL database.

  1. Install alembic with Python 3.6's pip pip install alembic
  2. Change your directory to the webapp where the alembic files are located cd webapp
  3. Clone alembic.example.ini into your own alembic.ini file to find and edit the following line sqlalchemy.url to equal your database uri. See here if you need help understanding how database uri works in SQLalchemy.
  4. In your terminal, run alembic upgrade head to upgrade your database tables to the current version on git. As long as there are only INFO messages and no errors, you should be fine.
  5. Check your database tables to see if they are created. If so, you have finished migrating your database! Remember to run Step 4 every now and then just in case if there are database updates. (Presumably on every git pull).

Redis

Titan also requires a Redis instance in order to function. There is no specific prerequisites before utilizing Titan with redis. Follow the official Redis installation instructions to install and start redis.

Join us!

Come and talk with us at our very own Discord server! We offer support too!

Translate for us!

Visit us over at our CrowdIn project and teach Titan how to speak your language!

Disclaimer

This project is never to be used as a replacement for Discord app. It is used in conjunction for a quick and dirty Discord embed for websites. Some uses are via shoutboxes, etc.

Badges

Upvote us on DiscordBots.org

DiscordBots.org

We proudly test our embeds to ensure a cross browser compatibility

BrowserStack

titan's People

Contributors

circl-lastname avatar endendragon avatar foxcqrn avatar jelle619 avatar jorivanee avatar julianschiavo avatar justmaffie2 avatar omnicons avatar softcreatr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

titan's Issues

Persistent Sessions

Either make the sessions for Discord users more permanent (auto 3-Day remember my login) or let the users choose if they would like to keep their sessions.

Guest users will not be able to keep their logins due to a few complications and security.

Server Griefers has Been Found!

This issue opens the case of implementing a server defense mechanisms from whom that have a bit too much free time in their lives.

Here are the following ideas that may be implemented:

  • Links Management

    • Option to append brackets to links (so the bot won't auto embed images)
    • or block off the links
    • limit the number of links can be appended in a message
  • Mentions handling

    • Limit the amount of mentions a message can have
  • @everyone escaping. Will be determined via server permissions.

  • Fix guild dashboard -- i am not sure what happened, but apparently/probably banning/kicking broke during the database update (very subjective, still tracking down the problem)

  • Moderation command for discord bot (@Titan#7689 ban EndenDragon#4151 You have misbehaved! - In this format)

    • Ban command
    • Kick command

About page

The page will give the user some ideas about the project and who's involved.

  • Big phat logo on the top
  • Info about titan
  • Notable people, like Riva the server hoster
  • An embedded version of the titan embeds server chat
  • Partnerships!!!!

Add Variable CSS Color System

  • Add a way for users to enter hex colors into an editor OR choose to use advanced CSS as before
  • Use those in the web app as CSS variables
  • Load base color CSS together with variables

If implemented correctly this should allow for non technical users to change colors and CSS without requiring the technical knowledge to make full themes. It should also allow for much quicker customisation by technical users as well.

Implement Websockets

Websockets are fun, lesser bandwidth, and users are able to see the chat updates instantly. We got the VPS, now let's implement it!

Admin Panel

Admin Panel TODO:

  • Create base
  • Add cosmetic management system
  • Copy the normal dashboard but instead of only adding the servers you can manage, bot admins can manage every server, maybe also a search for server by ID/Name/Owner/Owner ID

New Commands

Maybe have an invite command that sends the oauth link for the bot to the channel and a server command that sends an invite link to the discord server?

Rich embeds

You think that it's about time to implement it?

User Cards

Similar to how in Discord, you can get a bit more information from the user by clicking it's name. We should do something similar too.

  • User Profile when click on name in embed member list
  • The same as discord I want to have icons for atleast Titan Dev, the same as discord employee pretty much, but then our own

Auto Scrolldown

Hi,

Thanks for your project, i would want let you know the autoscroll down doesnt work on an android Webview. I tried both options noscroll=true and false.

Thanks

Channel list Scrollbars

Am I missing something or does the channel list not have a scrollbar when fixedsidenav is set to true.

I'm using scrollbartheme=inset and it works for the main body.

Cheers!

This is fantastic!

Channel categories

Alright, it's released on discord. lets make it happen on the embed too.

Allow the bot to work in servers of all kinds regardless of permission

There are servers who don't want to give us full Administrator access. Sure, it is possible, but for now, the bot will break if not given the proper permissions. At this moment we enforce administrator permissions so that we can not worry about it when developing. But those were the days. We should probably implement what happens when specific permissions are not enabled for the bot and have it act accordingly. (Eg, if Read Messages is not allowed for the bot in the particular channel, then the channel will not show up in the embed- ever, or if Manage Server permission is not given, then the bot is not able to enable the widgets to show the online members [so no member listing show], etc)
That way our bot can appear in most server without all the functionality (yet it still works to some extent).

Read chat without logging in

As Riva has put it

I'd love to be able to just show active chat in a smaller window on our website. That way it's always logged in and users can see the activity on our servers.

There would be a toggle in the server settings that can enable/disable this feature. If enabled, the user can read the channels that @everyone has access to. Otherwise if disabled, it would work the same as of now.

Nickname support

Currently, Titan will only show discord usernames and not nicknames. The support for nicknames is currently partially implemented in the database. We just need to make it display the nick.

Emoticons don't work :(

Just noticed that emoticons don't work, try typing and entering :D or :P in a embed page.
untitled

Migrate to rewrite version of discord.py (bot)

It's just better ๐Ÿ˜„ . To prevent buggy code from manual editing, you should use async2rewrite along with manual editing. Just because it's the "rewrite version" doesn't mean it's unstable ๐Ÿ˜‰
Anyway, thanks.

Responsive Sidebar Width

The sidebar currently has a set width. For very small embeds, it will fit the whole screen and cannot be exitted out. This is a problem.

CORS policy violation

Trying to integrate for the first time but getting the following:

Access to XMLHttpRequest at 'https://discordapp.com/api/guilds/..../widget.json' from origin 'https://titanembeds.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is between discordapp.com and titanembeds right? There's no special header I can set to allow this?

Custom Sounds for Notification

So currently sounds for notification is fresh and new. Now we need custom sounds for both mention and new messages that the user can set.

Add channels

People should be able to add text channels the same way they can in the normal discord interface

  • Create text channels modal

Feature request: Use a button for guest login instead

Request by Nihbru#1391

"is it possible to add a button for the guest login? something like this maybe.."
"From my POV it's easy to log in, its just some of my users aren't techy and because it's a radio station, they're not prepared to do much reading since they're not overly engaged or motivated, if possible, a button like that would be really great ๐Ÿ˜ƒ"

https://cdn.discordapp.com/attachments/300367171442442241/475342898112626698/guest-login-button.jpg

Implement emoji picker

Similar to how discord's emoji picker to the right of the message box, we should have a similar one too. At least get it working to show the server's emojis.

Create a bot and use websockets instead of long poll

As Jake has requested, I need to implement a way so the bot pushes information onto the database to avoid using Discord's API endpoints.
Will attempt to fix over this weekend, hang tight. (In the meantime, anyone got a server to host my bot on?)

Fix Guild Hoist

The sidebar guild hoisting is bugged. Users are not hoisted in the correct categories for some reason.

Permissions

Currently the embed gives you access to see every channel and their contents, we should make it so for guest users you can only view the channels the @everyone role can view, and for logged in users we follow their permissions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.