#voice-chat-text-0

1 messages Β· Page 888 of 1

warm bison
#

do i have to like import the file so the bot.py file can talk to it?

zenith radish
#

export PATH=$PATH:$HOME/.emacs.d/bin

primal yacht
#

Your config file can be a normal Python file that sets variables in its scope ... and then you can just:

import .config # assuming file is in same directory and called 'config.py'

Then access those variables like so:

config.TOKEN # for your config file's  `TOKEN = ....` thing
#

@warm bison ^

warm bison
#

got it let me try it

#

omg the errors

primal yacht
#
# config.py
NAME = 'Python'
AWESOME = True
# (main python file)
import .config
print('Is {} awesome?'.format(config.NAME))
print('Yes!' if config.AWESOME else 'Nope!')
#

Java - Minecraft: Java Edition modding

warm bison
#

like this?

#

nvm thats java

primal yacht
primal yacht
zenith radish
#

just use bedrock thonk

primal yacht
#

... Tell that to those on Mac or Linux which must use a 3rd-party solution and Google Play Store to own the game ...

warm bison
#

me who got into python like a week ago

zenith radish
#

proton thonkang

warm bison
#

still doestn understand

primal yacht
#

.... what?

#

I mean a launcher on Linux that wraps around the Android .apk

#

Why is leaf21 stuck with their mic on?

zenith radish
#

these questions are yet unanswered by science

terse needle
#

!e

def transpose(data: list[list[str]]):
    return list(map(list, zip(*data)))

matrix = [
  ['a', 'b', 'c'],
  ['A', 'B', 'C']
]

print(transpose(matrix))
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

[['a', 'A'], ['b', 'B'], ['c', 'C']]
stuck furnace
#

You're a bit quiet @neat acorn

#

Maybe try one of those meal kit delivery services @zenith radish

#

I find the most stressful part of cooking is decision making.

#

If you listen to a podcast while you do the dishes it can be quite enjoyable πŸ˜„

grim hemlock
#

bro

#

what the heck

#

why cant i verify

#

i did and it said i dont have 50 messages

#

oh well

#

Β―_(ツ)_/Β―

#

cheese is good

#

i like american

#

:)

#

i like subway

#

bruh

#

this stinks

#

subway in newyork lll ll ll lll

#

python is good

#

i kinda know how to code

#

im learning java

#

lll

#

llll l ll l l l l ll l l ll l

#

l ll l

#

ok ima stop

#

...

#

huh?

#

bruh moment

#

joe

#

lol

#

cough

#

mama

#

mama

#

mama

wise cargoBOT
#

failmail :ok_hand: applied mute to @grim hemlock until <t:1630199388:f> (9 minutes and 58 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

tiny socket
#

@tacit falcon if its enough context: 8 cocktails

tacit falcon
#

@tiny socket do you play any video games?

tiny socket
#

minecraft occasionally, but I mostly enjoy programming now

tacit falcon
tiny socket
#

thats the problem

#

I do

tacit falcon
tiny socket
#

which is why i refrain from playing them

tacit falcon
#

you worry about getting addicted?

tiny socket
#

me earlier:

tacit falcon
#

@tiny sockethow do you come up with fun things to make with python? I am currently working with data scraping, as it's something really intriguing to me, but I'm kinda running out of ideas. How do you guys constantly have ideas?

tiny socket
#

I like making discord api wrappers, when i finish making one i just kinda make another but better KEKW

tacit falcon
#

I already used the openweathermap api to make a basic weather program, and I have made and worked with github's api, but I'm not sure where to go from here.

tiny socket
#

the discord api is quite interesting to look into if you like making bots, other than that stuff like openweathermap-

#

lmao you've done that

#

OWM is my goto api to give people

tacit falcon
#

already made a discord bot with some commands

#

although I should probably look into making the bot await for input, since I've never attempted that

tiny socket
#

If you're interested in how it works at a low level, you get a much bigger project to try, so rather than using something like discord.py you connect to discord yourself with aiohttp

tacit falcon
#

that might be interesting

tiny socket
#

@devout mountain help joe is drunk

tacit falcon
#

@tiny sockethow would you connect to discord using a library like aiohttp? by sending a request to a api call?

rich cloud
#

why doesn't it make a sound?

tacit falcon
#

@whole rover do you know of any fun apis to work with? Or any ways to expand my thinking when it comes to data scraping?

forest zodiac
#

nice

rich cloud
#

asmr with joe

tiny socket
#

!otn a we're eating friend gopher

whole rover
#

!otn a we're eating friend gopher

wise cargoBOT
#

:ok_hand: Added we’re-eating-friend-gopher to the names list.

tiny socket
#

!otn a connected-to-the-Jake-network

grand wyvern
#

Postocts rooHappy

whole rover
#

!otn a jake uses dialup

wise cargoBOT
#

:ok_hand: Added jake-uses-dialup to the names list.

grand wyvern
#

picks up phone Oh no

#

There goes jake

whole rover
#

arthur deploy restart postgres

grand lionBOT
#

:warning: Please confirm you want to restart deploy/postgres in default

grand lionBOT
tiny socket
#

!otn a jack-the-repr

whole rover
#

!otn a jack-the-repr

wise cargoBOT
#

:ok_hand: Added jack-the-repr to the names list.

grand wyvern
#

Setup a PagerDuty alert profile to just call Jake when things break.

#

Day or night, just call Jake

#

Oh they will actually call you Jake :3c

#

Groovy voice robot and all

dense ibex
#

ooo

tiny socket
#

YouTube: C&Ds Groovy
Joe: I will be the replacement

grand wyvern
#

Pellegrino and Rum - The Banks

#

How much of each? yes.

modern sail
#

Remember to drink water @whole rover :D

rich cloud
#

this is how club fights happen lol

dense ibex
#

lmfaooo

devout mountain
#

@grand wyvern see ya dude!

grand wyvern
junior kayak
#

yo guys

#

anyone wanna help?

coarse cape
#

@brave steppe, i saw your review, i forgot to enable the transpararent option, doing that now

#

yee

#

yeah

#

sure

#

@brave steppe, I just got my new computer, setting stuffs up, can you give me 20 - 30 mins ? i can resolve this by then

#

im in the vc btw

#

πŸ‘

coarse cape
#

hey!

#

ah

#

haha

#

its so sunny here

#

rn in india, but im going to aus in 2 months

#

i came to visit my grandparents

#

:)

#

You are one of my fav members in this server :)

#

hehe

brave steppe
#

πŸ˜„

coarse cape
#

do you use vscode

#

awesome

#

i using lunarvim

#

its a port of neovim

#

grabbing a pic one min

#

its a better neovim

#

with vscode features

#

like intellisense etc

#

and autocomplete

#

eh, im a vim guy

#

@brave steppe ^

obsidian phoenix
#

oh

#

a discord bot?

brave steppe
#

This is @wise cargo

obsidian phoenix
#

what does that bot do?

brave steppe
#

Help channels, tags, it is pretty much the server's main bot.

coarse cape
#

sup

#

which formatter and linter do you use for python @brave steppe ?

#

im sorry for pinging you btw :(

#

mind putting the names here ?

#

tysm <3

brave steppe
#

Flake8 - general linting (max line length, amount of new lines, trailing whitespace etc.)

coarse cape
#

flake8 didnt work on my previous comp :(

brave steppe
#

Pyright - Static type checker (cannot add int and str type of errors)

coarse cape
#

i'll try it on this mac

#

tysm :) <3

gloomy vigil
gentle flint
#

my microphone port is occupied

gloomy vigil
zenith radish
#

I love you verboof

gentle flint
#

thank you LP

gloomy vigil
whole bear
#

sup

gloomy vigil
#

sup

whole bear
#

not much wbu

gloomy vigil
#

i am good

#

you are in afk though might wanna join vc

whole bear
#

anyone tried github copilot yet?

gloomy vigil
#

nah

coarse cape
#

hey lp!

whole bear
#

emac vs vim? @zenith radish

zenith radish
#

emacs obviously

acoustic folio
#

o

primal yacht
#

+1 for joining an empty voice chat :/

primal yacht
#

?

olive hedge
#

Sundays are not very popular for vc

primal yacht
#

trying to make me feel emotional?

olive hedge
#

Then we both can be πŸ˜„

primal yacht
#

because when i feel sad ... it is kinda difficult to get calm again

olive hedge
#

okie, sorry, was just teasing a bit, haha. Hope someone drops by VC though lemon_sentimental

primal yacht
#

I'm also not good at picking up on jokes (high-functioning autism)

#

@somber heath ! >w<

olive hedge
#

You can always lurk help channels if you are feeling lonely though.

primal yacht
#

... and sorry if I just went weird on you

olive hedge
primal yacht
#

I'm still serer muted ... the 72 hour requirement isn't up yet

#

So ... waiting it out

#

About 9:05 AM my time I can check to verify myself

olive hedge
#

one more hour me thinks

primal yacht
#

@somber heath I think they were possibly a troll or something ... jumped first to the AFK voice channel

#

But hey, that's just a theory.
A GAME Theory.
Thanks so much for watchin'.

#

@olive hedge ... about 5 minutes for me

#

You were probably off by an hour (timezone stuff)

olive hedge
#

hey look, your timezone

primal yacht
#

?

primal yacht
dense ibex
#

@primal yacht we actually have a command for that

#

!voice

wise cargoBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

dense ibex
#

Just so you know

primal yacht
#

I hope it is not an evolving door

forest zodiac
#

hello @somber heath

primal yacht
#

Same person was doing it a lot

#

User Profile under Settings

forest zodiac
primal yacht
#

Minecraft: Java Edition? ... used to

#

Very bad now since no good mouse

#

@zenith peak You asked in a Python Discord server >w<

#

yeah always full

#

skids and stuff

#

OwO

#

bash or what @slate pier ?

#

sh / bash / ksh / etc. are shells

#

bash is the default shell for Ubuntu

#

type into the shell:

#
echo "$BASHPID"
#

if bash was ran, it will likely output a non-empty line

#

Sunday

#

USA West coast

forest zodiac
#

its sunday

#

you cant

primal yacht
#

keep the music volume down

#

no need for copyright issues

#

Can't Be Fu##ed
Can't Be Bothered

#

I remember it somehow

#

Ubuntu uses Python for some aspects of its OS

#

Why else is Python installed by default?

#

headset off my ears

#

w<

#

wait-what? .... oh ... I got my hours wrong ... @olive hedge you were right

#

... or my laptop was being funky

#

Maybe their network speeds were bad for you / etc.

somber heath
#

!resources

wise cargoBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

somber heath
#

@indigo nacelle

primal yacht
#

I heard "he-he!" and I expected the rest of the line from Mario (first Mario Party game)

He-he! I got it!

#

Unless it was Mario Kart 64

brave steppe
#

lol

primal yacht
#

MK64 is the 3rd Mario Kart title …

brave steppe
#

bye I guess @primal yacht

#

haha

primal yacht
#

The first one (on the NES was not talked about much as it crashed a lot)

#

@brave steppe thanks … using my phone to type atm

somber heath
#

Jake the heretic.

primal yacht
#

TypeError?

#

JS ?

#
if isinstance( ins , the_type )
terse needle
#

!docs isinstance

wise cargoBOT
#

isinstance(object, classinfo)```
Return `True` if the *object* argument is an instance of the *classinfo* argument, or of a (direct, indirect, or [virtual](https://docs.python.org/3.10/glossary.html#term-abstract-base-class)) subclass thereof. If *object* is not an object of the given type, the function always returns `False`. If *classinfo* is a tuple of type objects (or recursively, other such tuples) or a [Union Type](https://docs.python.org/3.10/library/stdtypes.html#types-union) of multiple types, return `True` if *object* is an instance of any of the types. If *classinfo* is not a type or tuple of types and such tuples, a [`TypeError`](https://docs.python.org/3.10/library/exceptions.html#TypeError "TypeError") exception is raised.

Changed in version 3.10: *classinfo* can be a [Union Type](https://docs.python.org/3.10/library/stdtypes.html#types-union).
primal yacht
#

OwO I know about those!

#

I used to use them

#

yes, as a kid

#

discord.py stopped being updated

primal yacht
#

will it support live "hot-plugging" of commands?

willow light
#

I will never understand voluntarily moving to a place that is below sea level

primal yacht
#

dynamically add & remove commands

dense ibex
#

Or for mine and alec's lib?

primal yacht
#

will allow the bot to unregister stuff that no "guild" is using / etc.

#

either

#

at least chat-based

#

So if no "guild" is using, say, <prefix>leetspeak, you can pop it off the list of commands to look for in the command mapping

#

Pretty much, each "command" would have an init / register and uninit / unregister thing

#

am i moved to AFK again?

#

im typing on my phone ffs

#

why are you wanting to trace arrays? >w<

#

I know what those are!

#

Talking about being a reely good person.

#

cats are very intelligent

#

also, if your cat does go MIA for a long while, check for places it might hang out but hidden away ... especially if you sense a foul smell ||as it may have died while "protecting" you||

#

yeah, grooming

#

with my laptop's horrible screen, your shirt kinda looked like paper

#

@terse needle open does not recognize $HOME

primal yacht
#
import os
with open(os.path.join(os.environ['HOME'], 'dirpart', 'dirpart2', 'tailpart')) as f:
    # ...
primal yacht
sweet lodge
#
import os
os.path.expanduser('~')

or

from pathlib import Path
Path.home()
primal yacht
#

os.path.expanduser('~/path/to/whatever') iirc

#

This is why I dislike hardcoding / in them:

>>> import os
>>> os.path.expanduser('~/foo/bar')
'C:\\Users\\imlik/foo/bar'
#

Running that from within the Win10 host (IDLE)

sweet lodge
#

str(Path.home()

primal yacht
#

Also have a WSL2-powered Ubuntu

#

omg you reminded me of my """analog""" 1-disc looper for Minecraft (Bedrock)

#

2 sticky pistons, 1 hopper, 1 jukebox, 1 music disc of your choice (ONLY ONE) ... and a bit of redstone + repeaters

gentle flint
primal yacht
#

By a site admin:

I'm sorry but I don't think that we're able to help you as there are no physical facts to work with, so no physical solution to your problem.
Electromagnetic radiation, light, radio waves, and sound are all well understood physical phenomena which we can use, measure and manipulate. Spirits and telepathy are beyond the ability of Audacity, so I think best that we close this conversation here.

gentle flint
#

it goes on on the next page

primal yacht
#

Mediums are normally paid to come up with B. S.

gentle flint
#

true

primal yacht
#

psutil ?

#

psutils

#

I recall is in Ubuntu idk if default install

#

vim chic ?

#

what did i hear?

terse needle
#

i probably said vim shit

primal yacht
#

w<

#

my hearing is horrible

#

*giggle*

#

started ffmpeg conversion from mp4 to webm ...

#

Both are containers but both are different

#

MP3 is the same container as MP4

#

WEBM ... I recall there is the same for audio-only

#

so why is ffmpeg -i a.mp4 b.mp4 by far faster than ffmpeg -i a.mp4 b.webm ?

#

I need to make it small

zenith radish
#

-acodec copy -vcodec copy

obtuse basin
#

i can't talk cause i sent less than 50 messages

#

awesome

primal yacht
#

it was over 100MB (MiB?) ... so ... I need to shrink the video for here

warm canyon
#

why i cant talk

primal yacht
#

!voice

#

ninja'd

obtuse basin
#

you need at least 50 messages sent

warm canyon
#

!voice

obtuse basin
primal yacht
#

check this bot message@warm canyon now deleted the bot message

#
tar -xzvf file.tar.gz
dense ibex
#

!voice

wise cargoBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

dense ibex
#

?

#

Wait @primal yacht can you try to type !voice again

primal yacht
dense ibex
#

Wait do we remove the embed now

#

Did the command work for you?

primal yacht
#

btw

obtuse basin
#

the @wise cargo was made using php

primal yacht
#

I just needed to leave & join and .... ^w^

#

Expect my ugly male-at-birth voice

dense ibex
#

but I think we just delete the embed now after awhile

zenith radish
#
<?php

include __DIR__.'/vendor/autoload.php';

use Discord\Discord;

$discord = new Discord([
    'token' => 'bot-token',
]);

$discord->on('ready', function ($discord) {
    echo "Bot is ready!", PHP_EOL;

    // Listen for messages.
    $discord->on('message', function ($message, $discord) {
        echo "{$message->author->username}: {$message->content}",PHP_EOL;
    });
});

$discord->run();
primal yacht
#

@whole bear Please don't randomly DM someone

zenith radish
primal yacht
dense ibex
#

Yeah I got the same dm

primal yacht
hard sparrow
#

hello guys

#

πŸ˜‚ πŸ˜‚ πŸ˜‚

vivid palm
#

:o

hard sparrow
#

mina is girl name

#

nima is for boys

#

@primal yacht ^^^^^

#

@vivid palm are you indian?

vivid palm
#

no

#

i have a few desi friends/coworkers though

#

actually many

hard sparrow
#

ok

#

that's cool

vivid palm
#

hey aoeu

crimson copper
#

it won't let me connect

primal yacht
vivid palm
#

you said that the other day too, you can't figure out why?

stiff glacier
forest zodiac
primal yacht
crimson copper
#

that doesn't change whether or not i can connect

forest zodiac
#

that was fast

stiff glacier
#

oh

#

like you cant hear anything?

primal yacht
forest zodiac
#

hey @zenith radish

primal yacht
#
Lennart lennart = new Lennart();
stiff glacier
#

@crimson copper connecting now?

vivid palm
stiff glacier
#

^^

crimson copper
#

i can't hear anything

stiff glacier
#

pain

crimson copper
stiff glacier
#

try joining another voice call?

#

idk

vivid palm
#

lol time to reinstall, or use browser

primal yacht
stiff glacier
#

Thats a good idea

primal yacht
#

Pretty much the restart option next to power off

stiff glacier
#

working?

crimson copper
#

no

stiff glacier
#

restart ur computer then?

#

or phone

primal yacht
#

This Restart option on Win10

crimson copper
#

i'm using the browser

stiff glacier
#

wait, does discord have an update you havent installed yet?

#

oh

primal yacht
#

Then still restart your computer

crimson copper
#

whaatever

stiff glacier
#

rip

#

r u coming back or...

primal yacht
#

Sometimes a port can be left "in use" and thus cannot be reclaimed to the "unused" pool ... until you restart

forest zodiac
#

its $2000 here for government colleges

vivid palm
#

1 year at community and transfer to 4 year

#

is what i would do if i could go back

#

@whole bear please mute

stiff glacier
#

^^^

#

please mute

#

p l e a s e

cerulean ridge
#

@whole bear please mute

primal yacht
#

Even Android can do that ... I literally had to hard-kill NodeJS a few times and thus I made something in my code so I can manually specify a port (made an infinite loop somehow that ^C would not fix)

loud birch
#

can someone help with my project?

#

i basically want to connect my project with an sql database

crimson copper
#

i'll try another browser πŸ˜”

primal yacht
#

aoeu, is that a school computer or connected to a school / company VPN?

#

@loud birch also maybe ask in a better channel?

loud birch
#

idk just thought that someone here knew

crimson copper
#

wow, switching browsers worked

primal yacht
#

Ah, it is likely that browser's settings

#

and / or add-ons

primal yacht
loud birch
#

good

#

imagine how im feeling when im asking for help πŸ™‚

honest pier
#

that's occupied by someone else

loud birch
#

theyre all occupied what do you mean XD

honest pier
loud birch
#

ok got it

#

thanks

#

in help-chilli

honest pier
#

you'll also want to provide details about your problem, what you've tried

vivid palm
#

"morning" rabbit

amber raptor
vivid palm
#

kkkkkkkkk

amber raptor
vivid palm
#

does this mean i can get a doctors note to have night shift hours

#

diagnosis: night owl

#

lolll

stuck furnace
#

Who are these employers? πŸ˜„

#

Asking for a friend.

vivid palm
#

lolol

#

LX find the country that matches your current sleep schedule

#

apply, profit

stuck furnace
#

I feel like meetings should always be around lunch-time, then you should have like 3 hour windows in the morning and evening when you can arrive and leave (as long as you do X hours).

#

Probably would be good for reducing the rush-hour peak as well.

#

@dusky mango Deleted messages don't count towards the 50 message requirement.

primal yacht
#
if (condition) ;
  something();
#
return
foo()
```Same as:```js
return;
foo();
stuck furnace
#

I don't know if anyone actively monitors it.

#

We mostly go by alerts.

#

Yeah, fair enough πŸ˜„

primal yacht
#

#BadJoke

amber raptor
olive summit
#

yeah true

primal yacht
#

Totally not 0

amber raptor
#

Why is random messages going poof?

primal yacht
#

was deleted

stuck furnace
#

Is it an album or an LP πŸ˜„

#

I don't actually know.

forest zodiac
#

hey guys

#

does it makes sense to arrest someone

#

like they were planing to rob a bank

stuck furnace
#

Is this hypothetical, or... ? πŸ˜„

forest zodiac
#

it is hypothetical

honest pier
#

yes, it's conspiracy

amber raptor
#

Like anything in the law, it’s very YMMV

placid hill
vivid palm
#

spirited awayyyy

stuck furnace
#

Yeah, I'm bad a picking favourites.

#

I can name films I like, but if I tried to name my favourite I would inevitably overlook something.

zenith radish
gloomy vigil
forest zodiac
#

loki?

placid hill
#

great movie rave

primal yacht
#

Independence Day (also promoted as ID4) is a 1996 American science fiction action disaster film directed by Roland Emmerich and written by Emmerich and Dean Devlin. It stars an ensemble cast that includes Will Smith, Bill Pullman, Jeff Goldblum, Mary McDonnell, Judd Hirsch, Margaret Colin, Randy Quaid, Robert Loggia, James Rebhorn, Harvey Fierst...

amber raptor
#

AGM-114R9X

sick cloud
#

my wifi is dying

gloomy vigil
sick cloud
gloomy vigil
sick cloud
#

ye :/

primal yacht
#

I got carried away ... sorry

#

I can either blame my autism for getting stuck on the topic ... or I can blame myself (which means I mentally beat myself up) ........ which the latter currently seems to be the case of what is happening

#

.... no wonder people hate me so much ....

#

I'll take a break now

hushed dragon
gloomy vigil
#

is discord.py going to like don't get any more maintanance??

amber raptor
honest pier
#

Erm

gloomy vigil
gentle flint
amber raptor
#

FastAPI is replacement lemon_fingerguns_shades

gloomy vigil
#

time to swtich to Dpp

sick cloud
gloomy vigil
zenith radish
sick cloud
gloomy needle
#

Agreed

#

Go is great

#

I'll be switching to go too

zenith radish
#
package main

import (
    "flag"
    "fmt"
    "os"
    "os/signal"
    "syscall"

    "github.com/bwmarrin/discordgo"
)

var (
    Token string
)

func init() {
    flag.StringVar(&Token, "t", "", "Bot Token")
    flag.Parse()
}

func main() {
    dg, err := discordgo.New("Bot " + Token)
    if err != nil {
        fmt.Println("error creating Discord session,", err)
        return
    }

    dg.AddHandler(messageCreate)

    dg.Identify.Intents = discordgo.IntentsGuildMessages

    err = dg.Open()
    if err != nil {
        fmt.Println("error opening connection,", err)
        return
    }

    fmt.Println("Bot is now running.  Press CTRL-C to exit.")
    sc := make(chan os.Signal, 1)
    signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill)
    <-sc

    dg.Close()
}

func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
    if m.Author.ID == s.State.User.ID {
        return
    }
    if m.Content == "ping" {
        s.ChannelMessageSend(m.ChannelID, "Pong!")
    }

    if m.Content == "pong" {
        s.ChannelMessageSend(m.ChannelID, "Ping!")
    }
}
amber raptor
#

If your bot is call and response, off the websocket

gloomy needle
#

bruh go is good!

zenith radish
#
resp, err := http.Get("http://example.com/")```
gloomy needle
#

but parsing json responses to golang structs is kinda pain

honest pier
#

statically typed languages go brr

amber raptor
gloomy needle
#

rust syntax hurts the eye tho

gloomy vigil
#

c# better java

gloomy needle
#

yeah we can do everything that we can do with generics with interfaces

#

well almost everything

zenith radish
#
package controllers

import (
    "ifcord-rest/src/services"
    "log"
    "net/http"

    "github.com/gin-contrib/cors"
    "github.com/gin-gonic/gin"
)

type ICController struct {
    *gin.Engine
    icService services.IICService
}

func NewICController(icService services.IICService) *ICController {
    corsConfig := cors.DefaultConfig()
    corsConfig.AllowHeaders = []string{"*"}
    corsConfig.AllowAllOrigins = true

    router := gin.New()
    router.Use(gin.Recovery())
    router.Use(cors.New(corsConfig))

    icc := &ICController{
        Engine: router,
        icService: icService,
    }

    group := icc.Group("/api")
    group.POST("/bot" , icc.messageBot)

    return icc
}

func (icc *ICController) messageBot(c *gin.Context) {

    var message interface{}

    err := c.BindJSON(&message)
    if err != nil {
        log.Println("Invalid message.")
        c.Status(http.StatusBadRequest)
        return
    }

    err = icc.icService.SendMessage(message)
    if err != nil {
        log.Println("Failed to send message.")
        c.Status(http.StatusInternalServerError)
        return
    }

    c.Status(http.StatusOK)
}
gloomy needle
#

lol

#

it requires getting used to

#

yeah honestly most discord bots do not need a socket connection 90% of the time

#

yeah yeah that

vestal pagoda
#

I can't really speak in the voice channel, what are you guys discussing?

gloomy needle
#

also what's the status of web assembly with python? haven't been able to find a lot of stuff related to it.
I would give anything to replace js with python in my web projects

zenith radish
#

Wrong opinion but there's bython

#

Also wasm can't interact with the DOM

gloomy needle
#

its huge tho

zenith radish
#

???

#

what is?

gloomy needle
#

brython

#

the size

zenith radish
#

????

#

YOU'RE ADDING A WHOLE ASS NEW SCRIPTING LANGUAGE TO THE BROWSER

#

Ofc it's huge

gloomy needle
#

lol true

zenith radish
#

There's also languages that compile to the js like clojure

#

Typescript

#

A bunch of others

gloomy needle
#

hmm..

#

also wasm cant interact with dom? it can interact with canvas tho?

zenith radish
#

That's a separate thing tho

#

You can do stuff within the canvas

gloomy needle
#

oh, ok havent have much experience using canvases

latent zealot
gloomy needle
#

bruh go doesnt let you "ignore" errors, it just wants you to explicitly handle each error

dense ibex
gloomy vigil
#

@amber raptor dpp supports slash commands, does that still mean that fast API or smth like that is the replacement

cerulean ridge
#

verboof, how to get streaming right like you?

gloomy vigil
cerulean ridge
#

what is 201?

zenith radish
#

2019

gentle flint
#

the year 2019

#

@cerulean ridge

gloomy needle
#

I'm a student too cs undergrad rn

#

learning cyber security

#

did you participate in dfdc by facebook? @gloomy vigil

gloomy needle
#

I did, failed miserably lol

#

I just have one pynb in colab that starts an ssh and I just use that most of the time

cerulean ridge
gloomy needle
#

what?

#

do you mean in colab?

cerulean ridge
#

yes

gloomy needle
#

yeah you can use the gpu runtime

#

also theres a library that does just that, it starts an ssh or a vnc server and ngroks it

#

its called "remocolab" I think

gloomy vigil
brave steppe
#

Who is Brain?

gloomy vigil
brave steppe
gloomy vigil
# brave steppe

he didnt say that prs are bad he said that he put them before into the lib itself before the other libs were doing prs

gloomy needle
#

whats wrong with that pr title lol, seem perfectly fine...

gloomy vigil
brave steppe
gloomy needle
#

also how do you scale dpy bots over nodes?

alpine path
#

for websockets, you split the shards across processes

gloomy needle
#

so you gotta make your own shard manager basically?

alpine path
#

not really?

gloomy needle
#

I mean for auto scaling?

#

restart dead shards and stuff

alpine path
#

Well generally you dont auto scale them

gloomy needle
#

oh why tho?

#

wouldn't it make sense?

alpine path
#

because typically you double them up each time, and startups and restarts take a long time

#

if something breaks you'll munch through the identify limit real quick unless you go over 150k

#

e.g. we run 200 shards, next time we need to scale up we'll double it to 400 shards which will be at 400k servers

gloomy needle
#

oh, hmm...

alpine path
#

so typically

#

not much point

#

you might not want the system to restart everything just because you go 1 server over the limit when you have an update coming out

gloomy needle
#

got it

alpine path
#

(also for the record most bots dont need this)

alpine path
#

you only really need this when you start hitting 20-40k guilds+

gloomy needle
#

restarts take longer?

alpine path
#

well you have to wait for each shard to identify and connect

#

process by process

gloomy needle
#

oh, okay

#

ty

#

hey @gentle flint what distro you using?

gloomy vigil
gentle flint
#

yeah, debian 11

#

with i3wm

gloomy needle
#

cool, i3wm...

#

what are you working on?

amber raptor
# gloomy vigil

Brain is full of half truth IMO. Websocket is not going away however, it makes sense to move bots away from it.

#

So again, if your bot is call and response, then slash commands over HTTP is more scalable for you and discord

gloomy needle
#

gtg guys, I might be actually talk to you next time if I get verified. Bye!

amber raptor
#

And I could see discord stop providing slash commands over websocket

gloomy vigil
amber raptor
gloomy vigil
amber raptor
#

They have not made any formal announcement that it will

#

but I've been in IT long enough to see way the winds are blowing, it makes total sense to do so

gloomy vigil
#

hmm lets see what discord does

amber raptor
#

problem is, with the way discord move, it might be too late for some

gentle flint
#

@gloomy vigil she picked up

gloomy vigil
gentle flint
#

yeah alr

gentle flint
#

cya

amber raptor
gloomy vigil
amber raptor
gloomy vigil
zenith radish
#

Yeap that's what's gonna happen

#

The average discord bot dev doesn't want to figure out what an authorization header is.

brave steppe
#

e my bruddas

zenith radish
#

whats wrong with ur names

brave steppe
#

What's wrong with you

zenith radish
#

u want my psychiatrists notes or what?

brave steppe
#

Lmao I'll send my therapist to fight yours

zenith radish
#

mine is a 30 year old lady, I'm sure your's would win

#

Kanye sampled globgogabgalab, I'm sick of the 0.1% appropriating my culture

brave steppe
#

I'd be up to see the fight, in the ring. Let's do it KSI, Logan Paul style

zenith radish
#

Let's do it

brave steppe
#

Do you like gym @dense ibex or was it more like Running?

#

Ah shit, nice haha. Be really careful though. Because you're always targeting very specific muscles so it's pretty easy for things to go wrong when you don't do it correctly.

#

As opposed to other forms of workouts where you use your body itself

#

Alright welp I'll probably go to sleep now, gonna wake up early tomorrow for school ;(

#

Enjoy your evening lads @dense ibex @terse needle

#

πŸ‘’

devout mountain
#

@whole rover

#

@whole rover

#

joinnnn

somber heath
#

CentaurOS.

#

"If it's legal, it's fair."

No. No no no. No.

#

In conclusion...

#

No.

whole rover
#

!stream 163013595888615425 1h

wise cargoBOT
#

βœ… @devout mountain can now stream until <t:1630286557:f>.

whole rover
#

thoughts on getting a pydis mask

vivid palm
#

so does the dmv have its own dmv

whole rover
somber heath
#

Do they have Credit Union holiday?

stuck furnace
#

Take full advantage of those student discounts πŸ˜„

hollow haven
#

@whole rover did you just buy a fucking pydis mask?

grand wyvern
#

I want a mask! rooGimme

hollow haven
#

just... why

daring orbit
whole rover
dense ibex
#

Brb discord died

grand wyvern
#

Someone said hello to me and then voice perished on me. Hello rooHiWave

stuck furnace
#

Ah, those ratings don't mean anything.

daring orbit
#

Nice tv system

dense ibex
#

Discord just died again

#

Bruh

#

Why is mobile so bad

grand wyvern
#

Same here. Not mobile

daring orbit
#

Laptop on hybrid system

dense ibex
daring orbit
#

all devices

grand wyvern
#

and I've been all chop and no voice. Ah well. rooBlankGlitch

dense ibex
#

Alright I'm gonna head off to bed cya guys πŸ‘‹

whole rover
#

!stream 163013595888615425 30MM

wise cargoBOT
#
Bad argument

Could not convert "duration" into Duration or ISODateTime.
30MM is not a valid ISO-8601 datetime string

#
Command Help

!stream <member> [duration]
Can also use: streaming

*Temporarily grant streaming permissions to a member for a given duration.

A unit of time should be appended to the duration.
Units (βˆ—case-sensitive):
 y - years
 m - monthsβˆ—
 w - weeks
 d - days
 h - hours
 M - minutesβˆ—
 s - seconds

Alternatively, an ISO 8601 timestamp can be provided for the duration.*

whole rover
#

!stream 163013595888615425 30M

wise cargoBOT
#

βœ… @devout mountain can now stream until <t:1630288991:f>.

coarse cape
#

Hey people!!

brave steppe
timber lark
#

gooday sir

#

@atomic fiber

gentle flint
#

I really need to stop updating discord for android

#

it gets slower and uglier with each update

timber lark
#
Traceback (most recent call last):
  File "D:\RMIT\Python\Week 10\experimental\application(supposed to launch from here).py", line 9, in <module>
    app = Application()
  File "D:\RMIT\Python\Week 10\experimental\application(supposed to launch from here).py", line 7, in __init__
    self.__frontend = frontend.FrontEnd(self.__backend)
TypeError: __init__() takes 1 positional argument but 2 were given
hollow plank
#
    def __init__(self, backend):
        self.__backend=backend
        sys.stdout.write(str(self.__backend.get_password_count())+" Passwords loaded...\n\n")
        sys.stdout.write("Ai em da UI\n")
...
#

@timber lark

wind raptor
#

self.__frontend = frontend.FrontEnd(self.__backend)

#
    def __init__(self, back_end):
        self.__backend=back_end
timber lark
wind raptor
#
with open("filename.txt", "a") as f:
    f.write("message to append at end of file")
rugged root
#

As much as I love us

tiny socket
rugged root
primal yacht
#

I'm a client in adult foster care

#

My care provider lives on the basement floor

#

(the whole basement is off-limits to clients)

#

"Right?"
... or ...
.write() ?

rugged root
#

I've never heard of adult foster care

primal yacht
#

Foster Care for 18+ (USA)

#

It would be inhuman to kick people to the street (so-to-speak) who cannot live on their own whatsoever.

#
int(input()) # expects ONLY /^-?[0-9]+$/
#

wait-what? ... ... anyways, thanks for messing me up and finding this >w<

rugged root
#

So from what I'm reading adult foster care is similar to assisted living just on a smaller scale/less clients at a time

primal yacht
#

Assisted Living is different

#

Assisted Living is where the person is still paying for their own stuff, still must go shopping, etc. etc., a staff is NOT always there

#

A severely mentally handicapped person will be better in a place where there is always staff around

tiny socket
#

I have created the ideal emoji combination

#

leftearπŸ₯ΊπŸ‘‚

primal yacht
#

.... ...... the ears are too large

tiny socket
#

no, theyre exactly the right size mmLol

primal yacht
#

Reminds me of Dumbo the Flying Elephant (the cartoon, by the way)

wet token
#

hi guys

primal yacht
#

w<

timber lark
vivid palm
tiny socket
#

leftearπŸ˜¦πŸ‘‚

vivid palm
wet token
#

does anyone know how can i remove an amount of element from a list in 1 lane

primal yacht
#

oh, noez!

timber lark
wet token
#

with out typing if "..." and ''..." and "..." in inventory

primal yacht
#

I'm glad I don't drink coffee

wet token
#

coffee is the only thing i need to survive

primal yacht
wet token
#

where ?

primal yacht
#
>>> help(all)
Help on built-in function all in module builtins:

all(iterable, /)
    Return True if bool(x) is True for all values x in the iterable.
    
    If the iterable is empty, return True.
wet token
#

o_0 didn't get it

primal yacht
#

So you can also do:

if all(item in inventory):
    do_whatever()
#

Like skids ... @ idiots

#

download malware & other stuff

#

Taco Bell is still fast food

rugged root
#

Damn right

rugged root
tiny socket
primal yacht
timber lark
tiny socket
primal yacht
brave steppe
gloomy vigil
#

its just normal graphs

timber lark
#

rats

primal yacht
#

That's ... something I didn't expect to see as a sticker

timber lark
rich cloud
#

(ΰΈ‡οΈ‘'-'οΈ )ΰΈ‡

timber lark
primal yacht
#

Most scam links are specialized for a specific person ... to uniquely identify who clicked it.

wet token
#

@primal yacht if all(item in inventory):
do_whatever()

primal yacht
wet token
#

can i do if 10("apples" in inventory)

primal yacht
#

int is not callable

wet token
#

inventory.remove

#

how can i do it then ?

primal yacht
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

primal yacht
#

I don't know if each is stored as a single str or not

tiny socket
wet token
#

they are stored as string yeah

primal yacht
#

@tiny socket Don't forget about the "steam community" ... forced trade stuff?

#

Hatred against cute killed the Cat Girls

#

Cat playing with a cord that can fry the cat alive

#

Back when power cords were not so safe

tiny socket
#

!otn a schrodinger's-printer

rugged root
#

!otn a schrodinger's-printer

wise cargoBOT
#

:ok_hand: Added schrodinger’s-printer to the names list.

tiny socket
forest zodiac
#

hey guys

#

i need help with bs4

#

i am trying to use a css selector

tiny socket
brave steppe
#

@primal yacht

tiny socket
tiny socket
primal yacht
gloomy vigil
#

touch test.txt vs echo>test.txt what is better?

amber raptor
#

What year is this?

leaden star
leaden star
gloomy vigil
#

zombie games in 1990 the year is 2020 and our world is filled with zombies

brave steppe
#

Ummmm

#

halp

primal yacht
alpine path
#

gotta bounce, relatives randomly showed upo

brave steppe
#

lol

rugged root
alpine path
gloomy vigil
alpine path
#

err no

vivid palm
#

l mao

#

bc that's only an indian thing

alpine path
#

but for future refence

#

relatives exist in countries other than india

#

and unfortunately they do sometimes appear

gloomy vigil
rugged root
#

Not always

#

Just like anywhere

#

People be people

#

Have to call Canon to try and figure out what's up with this printer

gloomy vigil
#

alright

rugged root
#

The power socket is loose on this one

gentle flint
#

oh

rugged root
#

It's a portable printer

gentle flint
#

well, that's at least diagnosable

rugged root
#

Yeah, tried a couple adapters that would fit the spec

primal yacht
#

I dislike loose ports ... especially for the power port on a phone

gentle flint
#

i have a loose power port in my laptop

primal yacht
#

on a smartphone, it is easily possible to not charge it

crimson copper
#

send code? @timber lark

rugged root
#

I mean it's loose enough that it's just not working

gentle flint
#

rip

crimson copper
#

just send it again

timber lark
#
  File "D:\RMIT\Python\Week 10\experimental\application(supposed to launch from here).py", line 2, in <module>
    import frontend
  File "D:\RMIT\Python\Week 10\experimental\frontend.py", line 66, in <module>
    personal_password_manager=FrontEnd()
TypeError: __init__() missing 1 required positional argument: 'back_end'```
primal yacht
#
frontend.FrontEnd(self.__backend)
crimson copper
#

why don't you just send the code again

#

i mean, if you want help you should send the updated code

#

otherwise, you can't really expect much

wind raptor
#

personal_password_manager=FrontEnd()

primal yacht
#
personal_password_manager
#
#APPLICATION.PY
import backend
import frontend

class Application:
    def __init__(self):
        self.__backend = backend.BackEnd("data.csv")
        self.__frontend = frontend.FrontEnd(self.__backend)

app = Application()
#
>>> print('Spam Eggs', file=sys.stdout, flush=True, end='\n--\n')
Spam Eggs
--
>>> 
#
def printer(text, /):
    sys.stdout.write(str(text))
timber lark
primal yacht
#
Cls.__foo
Cls._Cls__foo
#

A.__foo
B.__foo different

timber lark
primal yacht
#
def __dir__(self, /):
    return []
timber lark
primal yacht
#
@property
def value(self, /):
    return self.__value

@value.setter
def value(self, x, /):
    self.__value = x
#
 |  __ge__(self, value, /)
 |      Return self>=value.
#
(10).__ge__(value=8) #error
timber lark
#

lebanon

primal yacht
#

got to go eat

#

and use the restroom

#

bbl i hope

#

eating & my phone for the VC

#

^w^

#

What exactly do you mean by "console"?

#

as in gaming console? terminal console?

#

gone already? oofles

#

output slider only (what i hear you all at -- global setting)

timber lark
#

\n

primal yacht
timber lark
primal yacht
#
def _main(self):
    menuText = ( "" ) # ...
    menuMinValue = 1
    menuMaxValue = 9
    while True:
        try:
            chosen = int(input(menuText))
        except ValueError:
            continue
        #...
wintry pier
#

i have more money than you you have and contact than you have

primal yacht
#
class Application:
    def __init__(self):
        self.__backend = <initializer for backend class>
        self.__frontend = frontend.FrontEnd(<reference to backend>)
gentle flint
gloomy vigil
gentle flint
#

random statements deserve random answers

#

just getting mic

#

hang on

gloomy vigil
gentle flint
#

bruh

#

I'll move

amber raptor
#

@dense ibex is bad at discord bot

dense ibex
#

lol yes

amber raptor
#

Also watching this PR is fun!

#

Monolithic app reviews are always 🍿

#

@dense ibex left us

dense ibex
#

I'm abouta stream because Xith told me to lol

amber raptor
dense ibex
#

Coding

amber raptor
#

New features since you are now dpy maintainer

dense ibex
#

lol says who

amber raptor
gentle flint
#

@dense ibex when stream

vivid palm
#

@stuck furnace karaoke with joe lol

stuck furnace
#

Β―_(ツ)_/Β―

warm bison
#

got to have fun sometimes

vivid palm
#

@muted hinge hiya

muted hinge
#

hello!

#

I don't want to unmute

vivid palm
#

special purple people

muted hinge
#

OH C'MON it's beautiful!

#

watches Xith traige ^^

#

My dual core CPU is now struggling :/

vivid palm
#

whyy

muted hinge
#

because I decided to watch the stream

vivid palm
#

lol how .. old is your machine

muted hinge
#

not a good idea with this laptop

#

uhhhhh

#

at least 5 years?

vivid palm
#

hmm

muted hinge
#

I'm now considering joining in the staff meetings, probably pretty chill. Obviously still muted (don't feel comfortable) but I'm curious ^^

lone veldt
#

curious too πŸ˜‚

muted hinge
#

I have access as a partner :p

lone veldt
#

πŸ˜›

#

btw i think i can learn something in the stream(?

vivid palm
#

they're working on issues/PRs for repos relevant to this server

lone veldt
#

oh~

vivid palm
#

not really teaching anything per se

swift valley
#

Good evening

#

Am I early?

#

I slept through the afternoon earlier now I can't sleep

#

At least my classes are in the afternoon

rugged root
#

!stream 806676792559403019

wise cargoBOT
#

βœ… @slate pier can now stream until <t:1630416517:f>.

swift valley
#

Introduction to CS has us doing HTML/CSS/JS

#

Yeah it kinda is

rugged root
#

Wait really?

swift valley
#

1st year of Uni is kinda boring aside from number theory, which I enjoyed the introduction to

#

We also have some fun elective courses like system administration, data science, and project management

slate pier
swift valley
fathom gorge
#

@slate pier which language is this

slate pier
#

HAPPINESS

#

HAPPI

#

APPIN

#

PPINE

olive hedge
#

!rule 4

wise cargoBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

tiny socket
#

@raw carbon i will break the usb port

#

all of them

#

every usb port

vivid palm
#

why do i feel like everyone is whispering

tiny socket
#

i will break

#

usb will die by my hand

#

as i wipe out each port one by one

#

</not a rant but idek how to explain the crap i just said>

olive hedge
vivid palm
#

i appreciate it

#

fisher your pfp looks like a cat when not zoomed in

olive hedge
#

I knowwww, I need to change it angy

frosty star
#

i love cats I have 6 :3

#

yes

#

I agree

frosty star
#

bad word lmao

tiny socket
brave steppe
#

sus

frosty star
#

@raw carbon you have a really nice voice.. just wanna put it out there

green bone
#

lmao @tiny socket do you start a project every day?

vivid palm
#

@timber larkyou can disable that sound notification on desktop

#

for people joining & leaving

frosty star
#

I think ppl just want to check what's up and then they... got shy?

#

idk