Giter Site home page Giter Site logo

anon-exploiter / vubot Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 4.0 11.78 MB

A script to post Quizzes, GDBs, and Assignments in Discord channel via WebHooks to alert the assignee.

License: Apache License 2.0

Python 98.50% Shell 1.50%
discord-server quizzes heroku webhooks virtual-university vu vubot virtual-university-of-pakistan vulms alert

vubot's Introduction

VUBot

A script to post Quizzes, GDBs, and Assignments in Discord channel via WebHooks to alert the assignee.

Features

  • Fetching Student's assigned GDBs, Quizzes and Assignments
  • From (v1.2), we get any pending challans' as well! ๐Ÿ˜„
  • Posting all that stuff in a Discord channel

How it works?

The script utilizies Web Applications source from VULMS. First it authenticates the user with his studentId and studentPassword and then creates and maintains a session. Utilizing that session, it accesses the ActivityCalendar.aspx file and gets the JSON containing the all data related to assigned stuff.

How to use?

Add the following environmental variables according to your credentials and then execute the script.

export USERNAME=bcXXXXXXXX
export PASSWORD=XXXXXXXXXXX
export WEBHOOK_URL=https://discord.com/api/webhooks/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
python3 vu.py

Alternatively, you can hard-code the credentials in the creds.sh file, source it, and execute the script.

source creds.sh
python3 vu.py

Output

vubot's People

Contributors

anon-exploiter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vubot's Issues

[Bug] Timezone issue while running script on Heroku

[Bug] Timezone issue while running the script on Discord

Alright, so I'm glad I found it sooner. Since the timezone in the Heroku server will be different than Pakistan the date always gets printed wrong for start/end date (hehe). Thankfully didn't miss any GDBs/Quizzes. Pushing the fix commit soon.

image

[Output formatting] GDBs data is clustered

As in the screenshot below, GDBs data is clustered while being printed in the Discord server. Since I only had one GDB assigned at the time of the creation of the script, wasn't able to test fully.

image

[Bug] Dates with -1 have print formatting issues

Removing 136-138 line numbers fix it. I'll be removing this now, will look for a permanent fix in future if it arises again.

if subtDate == -1:
    post        += f"[#] **{title}**\n"
    post        += f"Start date: {startDate}\n"

Output:

image

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.