Discord has a bot API but using any unofficial client ("self bots") can get your account banned. The Discord Matrix bridge warns about this, saying that attempts to use the friend request API from a bit will probably get your account permabanned (and the feature isn't active by default AFAIK).
Discord doesn't seem to go after unofficial clients as much as they could, but if this client becomes popular they'll probably go after them.
Discord doesn't seem to go after unofficial clients as much as they could, but if this client becomes popular they'll probably go after them.