1
0

✏️ Fix typo, missing await and weird code indentation

This commit is contained in:
2021-06-18 23:55:58 +02:00
parent a61accfae0
commit cb4edc0232
3 changed files with 5 additions and 6 deletions

View File

@@ -16,9 +16,8 @@ export {
const LOG_PREFIX = "[ChatClient] ";
async function connect(channels: Array<any>) {
const authProvider = await getAuthProvider(
const authProvider = await getAuthProvider();
);
if (
chatClient &&
(
@@ -85,8 +84,8 @@ async function handleClientAction(action: any) {
}
// send a chat message
function say(channel: string, message: string) {
chatClient.say(channel, message);
async function say(channel: string, message: string) {
await chatClient.say(channel, message);
}
// timeouts a user in a channel

View File

@@ -27,7 +27,7 @@ async function onRedemption(message: PubSubRedemptionMessage) {
`${LOG_PREFIX}Reward: "${message.rewardName}" (${message.rewardId}) redeemed by ${message.userDisplayName}`
);
// @ts-ignore
const reward = message._data.data.redemption.rewºard;
const reward = message._data.data.redemption.reward;
let msg: any = {
id: message.id,

View File

@@ -93,7 +93,7 @@ async function onRefresh(refreshData: AccessToken): Promise<void> {
async function getApiClient() {
const authProvider = await getAuthProvider();
return new ApiClient({ authProvider });
return await new ApiClient({ authProvider });
}
async function getUsernameFromId(userId: number) {